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