mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
omz bin simplified
This commit is contained in:
parent
2cf1adb251
commit
7cc12f64d9
3 changed files with 19 additions and 26 deletions
33
bin/omz.sh
33
bin/omz.sh
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
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 " 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"
|
||||
|
|
@ -13,29 +13,22 @@ 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 $@
|
||||
;;
|
||||
|
||||
* )
|
||||
shift 1
|
||||
|
||||
if [ -x $ZSH/tools/$COMMAND.sh ]; then
|
||||
zsh $ZSH/tools/$COMMAND.sh $@
|
||||
else
|
||||
omz_usage
|
||||
fi
|
||||
;;
|
||||
|
||||
'' | help )
|
||||
omz_usage ;;
|
||||
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -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
0
tools/upgrade.sh
Normal file → Executable file
Loading…
Add table
Add a link
Reference in a new issue