Skip to content

Commit

Permalink
Update shell completions
Browse files Browse the repository at this point in the history
  • Loading branch information
X3n0m0rph59 committed Aug 11, 2021
1 parent a68062c commit f0cb968
Show file tree
Hide file tree
Showing 5 changed files with 444 additions and 5 deletions.
137 changes: 136 additions & 1 deletion support/shell/completions/en_US/eruptionctl.bash-completion
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ _eruptionctl() {
cmd="eruptionctl"
;;

angle-snapping)
cmd+="__angle__snapping"
;;
bash)
cmd+="__bash"
;;
Expand All @@ -25,6 +28,18 @@ _eruptionctl() {
config)
cmd+="__config"
;;
debounce)
cmd+="__debounce"
;;
devices)
cmd+="__devices"
;;
distance)
cmd+="__distance"
;;
dpi)
cmd+="__dpi"
;;
edit)
cmd+="__edit"
;;
Expand Down Expand Up @@ -89,7 +104,7 @@ _eruptionctl() {

case "${cmd}" in
eruptionctl)
opts=" -v -c -h -V --verbose --config --help --version config status switch profiles names scripts param completions help"
opts=" -v -c -h -V --verbose --config --help --version config devices status switch profiles names scripts param completions help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand Down Expand Up @@ -247,6 +262,126 @@ _eruptionctl() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
eruptionctl__devices)
opts=" -h -V --help --version list info dpi distance angle-snapping debounce brightness"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
eruptionctl__devices__angle__snapping)
opts=" -h -V --help --version <device> <enable> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
eruptionctl__devices__brightness)
opts=" -h -V --help --version <device> <brightness> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
eruptionctl__devices__debounce)
opts=" -h -V --help --version <device> <enable> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
eruptionctl__devices__distance)
opts=" -h -V --help --version <device> <param> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
eruptionctl__devices__dpi)
opts=" -h -V --help --version <device> <dpi> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
eruptionctl__devices__info)
opts=" -h -V --help --version <device> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
eruptionctl__devices__list)
opts=" -h -V --help --version "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
eruptionctl__help)
opts=" -h -V --help --version "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
Expand Down
58 changes: 57 additions & 1 deletion support/shell/completions/en_US/eruptionctl.elvish-completion
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ edit:completion:arg-completer[eruptionctl] = [@words]{
cand -V 'Prints version information'
cand --version 'Prints version information'
cand config 'Configuration related sub-commands'
cand devices 'Get or set some device specific configuration parameters'
cand status 'Shows the currently active profile or slot'
cand switch 'Switch to a different profile or slot'
cand profiles 'Profile related sub-commands'
Expand All @@ -38,7 +39,7 @@ edit:completion:arg-completer[eruptionctl] = [@words]{
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand brightness 'Get or set the brightness of the LEDs'
cand brightness 'Get or set the global brightness of the LEDs'
cand soundfx 'Get or set the state of SoundFX'
}
&'eruptionctl;config;brightness'= {
Expand All @@ -53,6 +54,61 @@ edit:completion:arg-completer[eruptionctl] = [@words]{
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'eruptionctl;devices'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand list 'List connected devices and their indices (run this first)'
cand info 'Get information about a specific device'
cand dpi 'Get or set the DPI parameter (applicable for some mice)'
cand distance 'Get or set the DCU parameter (applicable for some mice)'
cand angle-snapping 'Get or set the angle-snapping parameter (applicable for some mice)'
cand debounce 'Get or set the debounce parameter (applicable for some mice)'
cand brightness 'Get or set the device specific brightness of the LEDs'
}
&'eruptionctl;devices;list'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'eruptionctl;devices;info'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'eruptionctl;devices;dpi'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'eruptionctl;devices;distance'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'eruptionctl;devices;angle-snapping'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'eruptionctl;devices;debounce'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'eruptionctl;devices;brightness'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
&'eruptionctl;status'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
Expand Down
37 changes: 36 additions & 1 deletion support/shell/completions/en_US/eruptionctl.fish-completion
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ complete -c eruptionctl -n "__fish_use_subcommand" -s v -l verbose -d 'Verbose m
complete -c eruptionctl -n "__fish_use_subcommand" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_use_subcommand" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_use_subcommand" -f -a "config" -d 'Configuration related sub-commands'
complete -c eruptionctl -n "__fish_use_subcommand" -f -a "devices" -d 'Get or set some device specific configuration parameters'
complete -c eruptionctl -n "__fish_use_subcommand" -f -a "status" -d 'Shows the currently active profile or slot'
complete -c eruptionctl -n "__fish_use_subcommand" -f -a "switch" -d 'Switch to a different profile or slot'
complete -c eruptionctl -n "__fish_use_subcommand" -f -a "profiles" -d 'Profile related sub-commands'
Expand All @@ -13,14 +14,48 @@ complete -c eruptionctl -n "__fish_use_subcommand" -f -a "completions" -d 'Gener
complete -c eruptionctl -n "__fish_use_subcommand" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c eruptionctl -n "__fish_seen_subcommand_from config" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from config" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from config" -f -a "brightness" -d 'Get or set the brightness of the LEDs'
complete -c eruptionctl -n "__fish_seen_subcommand_from config" -f -a "brightness" -d 'Get or set the global brightness of the LEDs'
complete -c eruptionctl -n "__fish_seen_subcommand_from config" -f -a "soundfx" -d 'Get or set the state of SoundFX'
complete -c eruptionctl -n "__fish_seen_subcommand_from brightness" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from brightness" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from brightness" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from soundfx" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from soundfx" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from soundfx" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from devices" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from devices" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from devices" -f -a "list" -d 'List connected devices and their indices (run this first)'
complete -c eruptionctl -n "__fish_seen_subcommand_from devices" -f -a "info" -d 'Get information about a specific device'
complete -c eruptionctl -n "__fish_seen_subcommand_from devices" -f -a "dpi" -d 'Get or set the DPI parameter (applicable for some mice)'
complete -c eruptionctl -n "__fish_seen_subcommand_from devices" -f -a "distance" -d 'Get or set the DCU parameter (applicable for some mice)'
complete -c eruptionctl -n "__fish_seen_subcommand_from devices" -f -a "angle-snapping" -d 'Get or set the angle-snapping parameter (applicable for some mice)'
complete -c eruptionctl -n "__fish_seen_subcommand_from devices" -f -a "debounce" -d 'Get or set the debounce parameter (applicable for some mice)'
complete -c eruptionctl -n "__fish_seen_subcommand_from devices" -f -a "brightness" -d 'Get or set the device specific brightness of the LEDs'
complete -c eruptionctl -n "__fish_seen_subcommand_from list" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from list" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from info" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from info" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from info" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from dpi" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from dpi" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from dpi" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from dpi" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from distance" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from distance" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from distance" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from distance" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from angle-snapping" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from angle-snapping" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from angle-snapping" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from angle-snapping" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from debounce" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from debounce" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from debounce" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from debounce" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from brightness" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from brightness" -r
complete -c eruptionctl -n "__fish_seen_subcommand_from brightness" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from brightness" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from status" -s h -l help -d 'Prints help information'
complete -c eruptionctl -n "__fish_seen_subcommand_from status" -s V -l version -d 'Prints version information'
complete -c eruptionctl -n "__fish_seen_subcommand_from status" -f -a "profile" -d 'Shows the currently active profile'
Expand Down
Loading

0 comments on commit f0cb968

Please sign in to comment.