omz tool to dynamically load plugins

This commit is contained in:
nebirhos 2012-03-24 05:14:54 +01:00
commit b326820004
5 changed files with 100 additions and 41 deletions

40
bin/omz
View file

@ -1,40 +0,0 @@
#!/bin/zsh
STATUS=0
function omz_usage() {
echo "OH MY ZSH! command line tool"
echo " theme choose your theme"
echo " upgrade upgrade OH MY ZSH"
echo " uninstall remove OH MY ZSH :("
echo " help show this help"
}
case $1 in
theme )
zsh $ZSH/tools/theme_chooser.sh
;;
upgrade )
zsh $ZSH/tools/upgrade.sh
;;
uninstall )
echo "Are you sure?"
zsh $ZSH/tools/uninstall.sh
;;
help )
omz_usage
;;
* )
omz_usage
STATUS=1
;;
esac
exit $STATUS

41
bin/omz.sh Executable file
View file

@ -0,0 +1,41 @@
#!/bin/zsh
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"
}
COMMAND=$1
case $COMMAND in
plugin )
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
;;
* )
omz_usage
;;
esac