omz bin simplified

This commit is contained in:
nebirhos 2012-03-25 18:51:48 +02:00
commit 7cc12f64d9
3 changed files with 19 additions and 26 deletions

View file

@ -2,40 +2,33 @@
function omz_usage() {
echo "Oh My Zsh command line tool. Available commands:"
echo " plugin NAME Enable plugin specified by NAME"
echo " theme Choose theme"
echo " upgrade Upgrade Oh My Zsh"
echo " uninstall Remove Oh My Zsh :("
echo " help Show this help"
echo " plugin Manage plugins"
echo " theme_chooser Preview themes"
echo " upgrade Upgrade Oh My Zsh"
echo " uninstall Remove Oh My Zsh :("
echo " help Show this help"
}
COMMAND=$1
case $COMMAND in
plugin )
plugin ) # we need source to enable autocompletion
shift 1
source $ZSH/tools/omz-plugin.sh $@
;;
theme )
zsh $ZSH/tools/theme_chooser.sh
;;
upgrade )
zsh $ZSH/tools/upgrade.sh
;;
uninstall )
zsh $ZSH/tools/uninstall.sh
;;
help )
omz_usage
source $ZSH/tools/$COMMAND.sh $@
;;
* )
omz_usage
shift 1
if [ -x $ZSH/tools/$COMMAND.sh ]; then
zsh $ZSH/tools/$COMMAND.sh $@
else
omz_usage
fi
;;
'' | help )
omz_usage ;;
esac

View file

@ -7,8 +7,8 @@ _omz_all_plugins() {
local -a _1st_arguments
_1st_arguments=(
'plugin:Enable plugin'
'theme:Choose theme'
'plugin:Manage plugins'
'theme_chooser:Preview themes'
'upgrade:Upgrade Oh My Zsh'
'uninstall:Remove Oh My Zsh :('
)

0
tools/upgrade.sh Normal file → Executable file
View file