mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
omz tool to dynamically load plugins
This commit is contained in:
parent
42d1ae029c
commit
b326820004
5 changed files with 100 additions and 41 deletions
40
bin/omz
40
bin/omz
|
|
@ -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
41
bin/omz.sh
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue