From b5872054f641bb417bd1ffc6a9ded1d95181b943 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 26 May 2026 07:01:40 +0200 Subject: no need to ship completions anymore! --- completions/rsp.zsh | 632 ---------------------------------------------------- 1 file changed, 632 deletions(-) delete mode 100644 completions/rsp.zsh (limited to 'completions/rsp.zsh') diff --git a/completions/rsp.zsh b/completions/rsp.zsh deleted file mode 100644 index 87fbfcd..0000000 --- a/completions/rsp.zsh +++ /dev/null @@ -1,632 +0,0 @@ -#compdef rsp - -autoload -U is-at-least - -_rsp() { - typeset -A opt_args - typeset -a _arguments_options - local ret=1 - - if is-at-least 5.2; then - _arguments_options=(-s -S -C) - else - _arguments_options=(-s -C) - fi - - local context curcontext="$curcontext" state line - _arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_rsp_commands" \ -"*::: :->rsp" \ -&& ret=0 - case $state in - (rsp) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:rsp-command-$line[1]:" - case $line[1] in - (start-daemon) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(stop-daemon) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(restart) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(play) -_arguments "${_arguments_options[@]}" : \ -'-i[Add after current track and skip to it]' \ -'--now[Add after current track and skip to it]' \ -'-n[Add to queue after current track (don'\''t skip)]' \ -'--next[Add to queue after current track (don'\''t skip)]' \ -'-h[Print help]' \ -'--help[Print help]' \ -'::query:_default' \ -&& ret=0 -;; -(pause) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(resume) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(toggle) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(stop) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(next) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(previous) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(volume) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -'::level:_default' \ -&& ret=0 -;; -(shuffle) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -'::mode:(on off all none album albums)' \ -&& ret=0 -;; -(queue) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -'::position:_default' \ -'::query:_default' \ -&& ret=0 -;; -(status) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(scan) -_arguments "${_arguments_options[@]}" : \ -'*--paths=[]:PATHS:_files' \ -'--force[]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(settings) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_rsp__subcmd__settings_commands" \ -"*::: :->settings" \ -&& ret=0 - - case $state in - (settings) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:rsp-settings-command-$line[1]:" - case $line[1] in - (get) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -':key:_default' \ -&& ret=0 -;; -(set) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -':key:_default' \ -':value:_default' \ -&& ret=0 -;; -(list) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(unset) -_arguments "${_arguments_options[@]}" : \ -'-h[Print help]' \ -'--help[Print help]' \ -':key:_default' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_rsp__subcmd__settings__subcmd__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:rsp-settings-help-command-$line[1]:" - case $line[1] in - (get) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(set) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(list) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(unset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_rsp__subcmd__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:rsp-help-command-$line[1]:" - case $line[1] in - (start-daemon) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(stop-daemon) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(restart) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(play) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(pause) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(resume) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(toggle) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(stop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(next) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(previous) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(volume) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(shuffle) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(queue) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(status) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(scan) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(settings) -_arguments "${_arguments_options[@]}" : \ -":: :_rsp__subcmd__help__subcmd__settings_commands" \ -"*::: :->settings" \ -&& ret=0 - - case $state in - (settings) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:rsp-help-settings-command-$line[1]:" - case $line[1] in - (get) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(set) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(list) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(unset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -} - -(( $+functions[_rsp_commands] )) || -_rsp_commands() { - local commands; commands=( -'start-daemon:Start the daemon' \ -'stop-daemon:Stop the daemon' \ -'restart:Restart the daemon (kill existing and start new)' \ -'play:Play a track, album, or artist' \ -'pause:Pause playback' \ -'resume:Resume playback' \ -'toggle:Toggle play/pause' \ -'stop:Stop playback' \ -'next:Skip to next track' \ -'previous:Skip to previous track' \ -'volume:Set volume (0-100)' \ -'shuffle:Shuffle mode' \ -'queue:Queue management' \ -'status:Show player status' \ -'scan:Scan music paths to populate database' \ -'settings:Settings management' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'rsp commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help_commands] )) || -_rsp__subcmd__help_commands() { - local commands; commands=( -'start-daemon:Start the daemon' \ -'stop-daemon:Stop the daemon' \ -'restart:Restart the daemon (kill existing and start new)' \ -'play:Play a track, album, or artist' \ -'pause:Pause playback' \ -'resume:Resume playback' \ -'toggle:Toggle play/pause' \ -'stop:Stop playback' \ -'next:Skip to next track' \ -'previous:Skip to previous track' \ -'volume:Set volume (0-100)' \ -'shuffle:Shuffle mode' \ -'queue:Queue management' \ -'status:Show player status' \ -'scan:Scan music paths to populate database' \ -'settings:Settings management' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'rsp help commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__help_commands] )) || -_rsp__subcmd__help__subcmd__help_commands() { - local commands; commands=() - _describe -t commands 'rsp help help commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__next_commands] )) || -_rsp__subcmd__help__subcmd__next_commands() { - local commands; commands=() - _describe -t commands 'rsp help next commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__pause_commands] )) || -_rsp__subcmd__help__subcmd__pause_commands() { - local commands; commands=() - _describe -t commands 'rsp help pause commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__play_commands] )) || -_rsp__subcmd__help__subcmd__play_commands() { - local commands; commands=() - _describe -t commands 'rsp help play commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__previous_commands] )) || -_rsp__subcmd__help__subcmd__previous_commands() { - local commands; commands=() - _describe -t commands 'rsp help previous commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__queue_commands] )) || -_rsp__subcmd__help__subcmd__queue_commands() { - local commands; commands=() - _describe -t commands 'rsp help queue commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__restart_commands] )) || -_rsp__subcmd__help__subcmd__restart_commands() { - local commands; commands=() - _describe -t commands 'rsp help restart commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__resume_commands] )) || -_rsp__subcmd__help__subcmd__resume_commands() { - local commands; commands=() - _describe -t commands 'rsp help resume commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__scan_commands] )) || -_rsp__subcmd__help__subcmd__scan_commands() { - local commands; commands=() - _describe -t commands 'rsp help scan commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__settings_commands] )) || -_rsp__subcmd__help__subcmd__settings_commands() { - local commands; commands=( -'get:Get a setting value' \ -'set:Set a setting value' \ -'list:List all settings' \ -'unset:Unset a setting' \ - ) - _describe -t commands 'rsp help settings commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__settings__subcmd__get_commands] )) || -_rsp__subcmd__help__subcmd__settings__subcmd__get_commands() { - local commands; commands=() - _describe -t commands 'rsp help settings get commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__settings__subcmd__list_commands] )) || -_rsp__subcmd__help__subcmd__settings__subcmd__list_commands() { - local commands; commands=() - _describe -t commands 'rsp help settings list commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__settings__subcmd__set_commands] )) || -_rsp__subcmd__help__subcmd__settings__subcmd__set_commands() { - local commands; commands=() - _describe -t commands 'rsp help settings set commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__settings__subcmd__unset_commands] )) || -_rsp__subcmd__help__subcmd__settings__subcmd__unset_commands() { - local commands; commands=() - _describe -t commands 'rsp help settings unset commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__shuffle_commands] )) || -_rsp__subcmd__help__subcmd__shuffle_commands() { - local commands; commands=() - _describe -t commands 'rsp help shuffle commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__start-daemon_commands] )) || -_rsp__subcmd__help__subcmd__start-daemon_commands() { - local commands; commands=() - _describe -t commands 'rsp help start-daemon commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__status_commands] )) || -_rsp__subcmd__help__subcmd__status_commands() { - local commands; commands=() - _describe -t commands 'rsp help status commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__stop_commands] )) || -_rsp__subcmd__help__subcmd__stop_commands() { - local commands; commands=() - _describe -t commands 'rsp help stop commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__stop-daemon_commands] )) || -_rsp__subcmd__help__subcmd__stop-daemon_commands() { - local commands; commands=() - _describe -t commands 'rsp help stop-daemon commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__toggle_commands] )) || -_rsp__subcmd__help__subcmd__toggle_commands() { - local commands; commands=() - _describe -t commands 'rsp help toggle commands' commands "$@" -} -(( $+functions[_rsp__subcmd__help__subcmd__volume_commands] )) || -_rsp__subcmd__help__subcmd__volume_commands() { - local commands; commands=() - _describe -t commands 'rsp help volume commands' commands "$@" -} -(( $+functions[_rsp__subcmd__next_commands] )) || -_rsp__subcmd__next_commands() { - local commands; commands=() - _describe -t commands 'rsp next commands' commands "$@" -} -(( $+functions[_rsp__subcmd__pause_commands] )) || -_rsp__subcmd__pause_commands() { - local commands; commands=() - _describe -t commands 'rsp pause commands' commands "$@" -} -(( $+functions[_rsp__subcmd__play_commands] )) || -_rsp__subcmd__play_commands() { - local commands; commands=() - _describe -t commands 'rsp play commands' commands "$@" -} -(( $+functions[_rsp__subcmd__previous_commands] )) || -_rsp__subcmd__previous_commands() { - local commands; commands=() - _describe -t commands 'rsp previous commands' commands "$@" -} -(( $+functions[_rsp__subcmd__queue_commands] )) || -_rsp__subcmd__queue_commands() { - local commands; commands=() - _describe -t commands 'rsp queue commands' commands "$@" -} -(( $+functions[_rsp__subcmd__restart_commands] )) || -_rsp__subcmd__restart_commands() { - local commands; commands=() - _describe -t commands 'rsp restart commands' commands "$@" -} -(( $+functions[_rsp__subcmd__resume_commands] )) || -_rsp__subcmd__resume_commands() { - local commands; commands=() - _describe -t commands 'rsp resume commands' commands "$@" -} -(( $+functions[_rsp__subcmd__scan_commands] )) || -_rsp__subcmd__scan_commands() { - local commands; commands=() - _describe -t commands 'rsp scan commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings_commands] )) || -_rsp__subcmd__settings_commands() { - local commands; commands=( -'get:Get a setting value' \ -'set:Set a setting value' \ -'list:List all settings' \ -'unset:Unset a setting' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'rsp settings commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__get_commands] )) || -_rsp__subcmd__settings__subcmd__get_commands() { - local commands; commands=() - _describe -t commands 'rsp settings get commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__help_commands] )) || -_rsp__subcmd__settings__subcmd__help_commands() { - local commands; commands=( -'get:Get a setting value' \ -'set:Set a setting value' \ -'list:List all settings' \ -'unset:Unset a setting' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'rsp settings help commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__help__subcmd__get_commands] )) || -_rsp__subcmd__settings__subcmd__help__subcmd__get_commands() { - local commands; commands=() - _describe -t commands 'rsp settings help get commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__help__subcmd__help_commands] )) || -_rsp__subcmd__settings__subcmd__help__subcmd__help_commands() { - local commands; commands=() - _describe -t commands 'rsp settings help help commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__help__subcmd__list_commands] )) || -_rsp__subcmd__settings__subcmd__help__subcmd__list_commands() { - local commands; commands=() - _describe -t commands 'rsp settings help list commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__help__subcmd__set_commands] )) || -_rsp__subcmd__settings__subcmd__help__subcmd__set_commands() { - local commands; commands=() - _describe -t commands 'rsp settings help set commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__help__subcmd__unset_commands] )) || -_rsp__subcmd__settings__subcmd__help__subcmd__unset_commands() { - local commands; commands=() - _describe -t commands 'rsp settings help unset commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__list_commands] )) || -_rsp__subcmd__settings__subcmd__list_commands() { - local commands; commands=() - _describe -t commands 'rsp settings list commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__set_commands] )) || -_rsp__subcmd__settings__subcmd__set_commands() { - local commands; commands=() - _describe -t commands 'rsp settings set commands' commands "$@" -} -(( $+functions[_rsp__subcmd__settings__subcmd__unset_commands] )) || -_rsp__subcmd__settings__subcmd__unset_commands() { - local commands; commands=() - _describe -t commands 'rsp settings unset commands' commands "$@" -} -(( $+functions[_rsp__subcmd__shuffle_commands] )) || -_rsp__subcmd__shuffle_commands() { - local commands; commands=() - _describe -t commands 'rsp shuffle commands' commands "$@" -} -(( $+functions[_rsp__subcmd__start-daemon_commands] )) || -_rsp__subcmd__start-daemon_commands() { - local commands; commands=() - _describe -t commands 'rsp start-daemon commands' commands "$@" -} -(( $+functions[_rsp__subcmd__status_commands] )) || -_rsp__subcmd__status_commands() { - local commands; commands=() - _describe -t commands 'rsp status commands' commands "$@" -} -(( $+functions[_rsp__subcmd__stop_commands] )) || -_rsp__subcmd__stop_commands() { - local commands; commands=() - _describe -t commands 'rsp stop commands' commands "$@" -} -(( $+functions[_rsp__subcmd__stop-daemon_commands] )) || -_rsp__subcmd__stop-daemon_commands() { - local commands; commands=() - _describe -t commands 'rsp stop-daemon commands' commands "$@" -} -(( $+functions[_rsp__subcmd__toggle_commands] )) || -_rsp__subcmd__toggle_commands() { - local commands; commands=() - _describe -t commands 'rsp toggle commands' commands "$@" -} -(( $+functions[_rsp__subcmd__volume_commands] )) || -_rsp__subcmd__volume_commands() { - local commands; commands=() - _describe -t commands 'rsp volume commands' commands "$@" -} - -if [ "$funcstack[1]" = "_rsp" ]; then - _rsp "$@" -else - compdef _rsp rsp -fi -- cgit v1.2.3