feat(cli): list available Shellsaver scenes

This commit is contained in:
Robby Russell committed 2026-10-08 22:46:45 -07:00
1 parent b4e1e1083f
commit 4f326e2702
3 files changed
+16 -7

No files matched your search

+2 -1
View File
@@ -251,7 +251,7 @@ terminal screensavers. The aquarium is the default; choose another scene to chan
omz shellsaver # A quiet aquarium full of sea shells
omz shellsaver logo # The updater's rainbow logo, bouncing around
omz shellsaver hermit # A slightly lost hermit crab
omz shellsaver party # A rainbow stage and a dancing crowd
omz shellsaver party # A rainbow stage and a dancing crowd
```
Press any key or Ctrl-C to return to your shell. Screensavers run only when invoked
@@ -261,6 +261,7 @@ Use `omz help` to discover the command, and Tab to complete scene names and opti
```zsh
omz shellsaver aquarium --seconds 30 # Stop automatically after 30 seconds
omz shellsaver logo --mono # Use the terminal's foreground color
omz shellsaver --list # List scenes (aquarium is the default)
omz shellsaver --help # Show all scenes and options
```
+1
View File
@@ -39,6 +39,7 @@ function _omz {
_arguments \
'1:command:' \
'2::scene:(aquarium logo hermit party)' \
'--list[List available scenes]' \
'--mono[Use the default foreground color]' \
'--seconds[Exit after a number of seconds]:seconds:' \
'--snapshot[Print a plain-text still]::frame:' \
+13 -6
View File
@@ -11,18 +11,24 @@
local saved_tty='' key='' blank='' result='' scene=''
local -a canvas inks palette
_zshell_list() {
print -r -- 'aquarium Sea shells, a ~ hermit crab, and a quiet current (default).
logo The Oh My Zsh wordmark takes a bouncing coffee break.
hermit A bewildered hermit crab tries to find its working directory.
party A rainbow terminal stage and a crowd of dancing shell fans.'
}
_zshell_usage() {
print -r -- 'Oh My Zsh / experimental Shellsavers
Usage: omz shellsaver [aquarium|logo|hermit|party] [--mono] [--seconds N]
omz shellsaver [aquarium|logo|hermit|party] --snapshot [FRAME]
aquarium Sea shells, a ~ hermit crab, and a quiet current (default).
logo The Oh My Zsh wordmark takes a bouncing coffee break.
hermit A bewildered hermit crab tries to find its working directory.
party A rainbow terminal stage and a crowd of dancing shell fans.
omz shellsaver --list
'
_zshell_list
print -r -- '
Any key returns to the shell. Ctrl-C also exits safely.
--list List available scenes and the default.
--mono Use the terminal default foreground color.
--seconds N Exit automatically after 1-3600 seconds.
--snapshot Print a still at 96 columns x 28 rows (no terminal needed).
@@ -40,6 +46,7 @@ Nothing is installed or enabled automatically.'
while (( $# )); do
case "$1" in
--help|-h) _zshell_usage; exit 0 ;;
--list) _zshell_list; exit 0 ;;
--mono) mono=1 ;;
--seconds)
shift