From 534e19fd3426173954c08aec5c0d60ddf9c0b26c Mon Sep 17 00:00:00 2001 From: Martin von Reichenberg Date: Thu, 10 Aug 2023 02:37:12 +0200 Subject: [PATCH] Completion directory replaced with Completions Completion directory replaced with Completions . . . --- completion/_dualsensectl | 29 ----------------------------- completion/dualsensectl | 27 --------------------------- 2 files changed, 56 deletions(-) delete mode 100644 completion/_dualsensectl delete mode 100644 completion/dualsensectl diff --git a/completion/_dualsensectl b/completion/_dualsensectl deleted file mode 100644 index 9409c71..0000000 --- a/completion/_dualsensectl +++ /dev/null @@ -1,29 +0,0 @@ -#compdef dualsensectl - -(( $+functions[_dualsensectl_commands] )) || -_dualsensectl_commands(){ - local -a _dualsensectl_cmds - - _dualsensectl_cmds=( - 'power-off:turn off the controller' - 'battery:get the controller battery level' - 'info:Get the controller firmware info' - 'lightbar:control the lightbar' - 'player-leds:control the player LEDs' - 'microphone:enable or disable microphone' - 'microphone-led:control the microphone LED' - 'speaker:control the sound output' - 'volume:control the volume' - 'attenuation: control vibration attenuation' - 'trigger:control trigger force feedback' - ) - - if ((CURRENT == 1)); then - _describe -t commands 'dualsensectl commands' _dualsensectl_cmds - fi -} - -_arguments \ - '--help[Print help text]' \ - '--version[Print version number]' \ - '*::dualsensectl commands:_dualsensectl_commands' diff --git a/completion/dualsensectl b/completion/dualsensectl deleted file mode 100644 index 34551c5..0000000 --- a/completion/dualsensectl +++ /dev/null @@ -1,27 +0,0 @@ -_dualsensectl() -{ - local cur prev opts - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - prevprev="${COMP_WORDS[COMP_CWORD-2]}" - opts="--help --version" - verbs=(power-off battery info lightbar player-leds microphone microphone-led speaker volume attenuation trigger) - effects=(off feedback weapon bow galloping machine vibration feedback-raw vibration-raw) - - if [[ ${cur} = -* ]] ; then - COMPREPLY=( $(compgen -W '${opts}' -- "$cur") ) - elif [[ ${prev} = lightbar ]] ; then - COMPREPLY=( $(compgen -W 'on off' -- "$cur") ) - elif [[ ${prev} = speaker ]] ; then - COMPREPLY=( $(compgen -W 'internal headphone both' -- "$cur") ) - elif [[ ${prev} = trigger ]] ; then - COMPREPLY=( $(compgen -W 'left both right' -- "$cur") ) - elif [[ ${prevprev} = trigger ]] ; then - COMPREPLY=( $(compgen -W '${effects[*]}' -- "$cur") ) - elif [[ $COMP_CWORD < 2 ]] ; then - COMPREPLY=( $(compgen -W '${verbs[*]}' -- "$cur") ) - fi -} - -complete -F _dualsensectl dualsensectl