ozsh/libozsh.zsh

26 lines
618 B
Bash
Raw Normal View History

2021-02-21 04:37:27 +00:00
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
2021-02-21 05:58:12 +00:00
git -C $OZSH_HOME pull --rebase
2021-02-21 04:37:27 +00:00
git -C $OZSH_HOME stash pop
git -C $OZSH_HOME submodule update --recursive --remote
}