mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-12-01 04:43:04 +01:00
feat(cli): add Shellsavers terminal animations
This commit is contained in:
1 parent
9f9b28a13d
commit
aefaa0b966
4 files changed
+978
No files matched your search
+23
@@ -28,12 +28,25 @@ function _omz {
|
||||
'plugin:Manage plugins'
|
||||
'pr:Manage Oh My Zsh Pull Requests'
|
||||
'reload:Reload the current zsh session'
|
||||
'screensaver:Launch a whimsical terminal screensaver'
|
||||
'shellsaver:Alias for screensaver'
|
||||
'shop:Open the Oh My Zsh shop'
|
||||
'theme:Manage themes'
|
||||
'update:Update Oh My Zsh'
|
||||
'version:Show the version'
|
||||
)
|
||||
|
||||
if [[ "$words[2]" == (screensaver|shellsaver) ]] && (( CURRENT > 2 )); then
|
||||
_arguments \
|
||||
'1:command:(screensaver shellsaver)' \
|
||||
'2::scene:(aquarium logo hermit party)' \
|
||||
'--mono[Use the default foreground color]' \
|
||||
'--seconds[Exit after a number of seconds]:seconds:' \
|
||||
'--snapshot[Print a plain-text still]::frame:' \
|
||||
'--help[Show screensaver help]'
|
||||
return
|
||||
fi
|
||||
|
||||
if (( CURRENT == 2 )); then
|
||||
_describe 'command' cmds
|
||||
elif (( CURRENT == 3 )); then
|
||||
@@ -174,6 +187,8 @@ Available commands:
|
||||
plugin <command> Manage plugins
|
||||
pr <command> Manage Oh My Zsh Pull Requests
|
||||
reload Reload the current zsh session
|
||||
screensaver [scene] Launch a screensaver (aquarium by default)
|
||||
shellsaver [scene] Alias for screensaver
|
||||
shop Open the Oh My Zsh shop
|
||||
theme <command> Manage themes
|
||||
update Update Oh My Zsh
|
||||
@@ -182,6 +197,14 @@ Available commands:
|
||||
EOF
|
||||
}
|
||||
|
||||
function _omz::screensaver {
|
||||
command zsh -f "$ZSH/tools/screensaver.zsh" "$@"
|
||||
}
|
||||
|
||||
function _omz::shellsaver {
|
||||
_omz::screensaver "$@"
|
||||
}
|
||||
|
||||
function _omz::changelog {
|
||||
local version=${1:-HEAD} format=${3:-"--text"}
|
||||
|
||||
|
||||
Reference in new issue
Block a user