ozsh/libozsh.zsh
2021-02-20 23:37:27 -05:00

26 lines
609 B
Bash

export OZSH_HOME="$HOME/.ozsh"
function ozsh_load {
if [ $# -ne 2 ]; then
echo "Invalid ozsh_load number of arguments: $#"
return
fi
if [ "$1" = 'plugin' ]; then
source "$OZSH_HOME/modules/$2/$2.plugin.zsh"
elif [ "$1" = 'theme' ]; then
source "$OZSH_HOME/modules/$2/$2.zsh-theme"
elif [ "$1" = 'plugin_omz' ]; then
source "$OZSH_HOME/modules/ohmyzsh/plugins/$2/$2.plugin.zsh"
else
echo "Invalid ozsh_load arguments: $@"
fi
}
function ozsh_update {
git -C $OZSH_HOME stash
git -C $OZSH_HOME pull
git -C $OZSH_HOME stash pop
git -C $OZSH_HOME submodule update --recursive --remote
}