From 1059d878476c231f84ef9d3c2e8bcafaf978bc87 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 13 May 2026 11:27:16 +0200 Subject: Regenerate shell completions and install script fixes - Add hidden completions subcommand to CLI (developer use only) - Regenerate all completion scripts from current CLI structure - Add elvish and powershell completion scripts - install.sh: Fix rsp stop -> rsp stop-daemon, rsp start -> rsp start-daemon - install.sh: Install completions for user's current shell - install.sh: Zsh uses /usr/share/zsh/site-functions/_rsp directly --- completions/rsp.elvish | 224 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 completions/rsp.elvish (limited to 'completions/rsp.elvish') diff --git a/completions/rsp.elvish b/completions/rsp.elvish new file mode 100644 index 0000000..54ccdfe --- /dev/null +++ b/completions/rsp.elvish @@ -0,0 +1,224 @@ + +use builtin; +use str; + +set edit:completion:arg-completer[rsp] = {|@words| + fn spaces {|n| + builtin:repeat $n ' ' | str:join '' + } + fn cand {|text desc| + edit:complex-candidate $text &display=$text' '(spaces (- 14 (wcswidth $text)))$desc + } + var command = 'rsp' + for word $words[1..-1] { + if (str:has-prefix $word '-') { + break + } + set command = $command';'$word + } + var completions = [ + &'rsp'= { + cand -h 'Print help' + cand --help 'Print help' + cand start-daemon 'Start the daemon' + cand stop-daemon 'Stop the daemon' + cand restart 'Restart the daemon (kill existing and start new)' + cand play 'Play a track, album, or artist' + cand pause 'Pause playback' + cand resume 'Resume playback' + cand toggle 'Toggle play/pause' + cand stop 'Stop playback' + cand next 'Skip to next track' + cand previous 'Skip to previous track' + cand volume 'Set volume (0-100)' + cand shuffle 'Shuffle mode' + cand queue 'Queue management' + cand status 'Show player status' + cand scan 'Scan music paths to populate database' + cand settings 'Settings management' + cand completions 'Generate shell completions (developer only)' + cand help 'Print this message or the help of the given subcommand(s)' + } + &'rsp;start-daemon'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;stop-daemon'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;restart'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;play'= { + cand -i 'Add after current track and skip to it' + cand --now 'Add after current track and skip to it' + cand -n 'Add to queue after current track (don''t skip)' + cand --next 'Add to queue after current track (don''t skip)' + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;pause'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;resume'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;toggle'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;stop'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;next'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;previous'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;volume'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;shuffle'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;queue'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;status'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;scan'= { + cand --paths 'paths' + cand --force 'force' + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;settings'= { + cand -h 'Print help' + cand --help 'Print help' + cand get 'Get a setting value' + cand set 'Set a setting value' + cand list 'List all settings' + cand unset 'Unset a setting' + cand help 'Print this message or the help of the given subcommand(s)' + } + &'rsp;settings;get'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;settings;set'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;settings;list'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;settings;unset'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;settings;help'= { + cand get 'Get a setting value' + cand set 'Set a setting value' + cand list 'List all settings' + cand unset 'Unset a setting' + cand help 'Print this message or the help of the given subcommand(s)' + } + &'rsp;settings;help;get'= { + } + &'rsp;settings;help;set'= { + } + &'rsp;settings;help;list'= { + } + &'rsp;settings;help;unset'= { + } + &'rsp;settings;help;help'= { + } + &'rsp;completions'= { + cand -h 'Print help' + cand --help 'Print help' + } + &'rsp;help'= { + cand start-daemon 'Start the daemon' + cand stop-daemon 'Stop the daemon' + cand restart 'Restart the daemon (kill existing and start new)' + cand play 'Play a track, album, or artist' + cand pause 'Pause playback' + cand resume 'Resume playback' + cand toggle 'Toggle play/pause' + cand stop 'Stop playback' + cand next 'Skip to next track' + cand previous 'Skip to previous track' + cand volume 'Set volume (0-100)' + cand shuffle 'Shuffle mode' + cand queue 'Queue management' + cand status 'Show player status' + cand scan 'Scan music paths to populate database' + cand settings 'Settings management' + cand completions 'Generate shell completions (developer only)' + cand help 'Print this message or the help of the given subcommand(s)' + } + &'rsp;help;start-daemon'= { + } + &'rsp;help;stop-daemon'= { + } + &'rsp;help;restart'= { + } + &'rsp;help;play'= { + } + &'rsp;help;pause'= { + } + &'rsp;help;resume'= { + } + &'rsp;help;toggle'= { + } + &'rsp;help;stop'= { + } + &'rsp;help;next'= { + } + &'rsp;help;previous'= { + } + &'rsp;help;volume'= { + } + &'rsp;help;shuffle'= { + } + &'rsp;help;queue'= { + } + &'rsp;help;status'= { + } + &'rsp;help;scan'= { + } + &'rsp;help;settings'= { + cand get 'Get a setting value' + cand set 'Set a setting value' + cand list 'List all settings' + cand unset 'Unset a setting' + } + &'rsp;help;settings;get'= { + } + &'rsp;help;settings;set'= { + } + &'rsp;help;settings;list'= { + } + &'rsp;help;settings;unset'= { + } + &'rsp;help;completions'= { + } + &'rsp;help;help'= { + } + ] + $completions[$command] +} -- cgit v1.2.3