diff options
Diffstat (limited to '')
| -rw-r--r-- | shell-completions/aur-completion.bash (renamed from aur-completion.bash) | 6 | ||||
| -rw-r--r-- | shell-completions/aur.completor.bash (renamed from aur.completor.bash) | 3 | ||||
| -rw-r--r-- | shell-completions/aur.fish (renamed from aur.fish) | 3 |
3 files changed, 7 insertions, 5 deletions
diff --git a/aur-completion.bash b/shell-completions/aur-completion.bash index 3644e85..224f1ee 100644 --- a/aur-completion.bash +++ b/shell-completions/aur-completion.bash @@ -12,13 +12,13 @@ # shellcheck disable=2207 # editorconfig-checker-disable -_aur_comp_cmd_opts=( -h --help -l --list -f --force -g --git -c --config ) +_aur_comp_cmd_opts=( -h --help -v --version -l --list -f --force -g --git -c --config ) _aur_comp_reply_aur_pkgs () { pkgs=$(basename -a ~/.aur/*/ | paste -d ' ' -s -); - COMPREPLY=("$(compgen -W "$pkgs" -- "$cur")") + COMPREPLY=($(compgen -W "$pkgs" -- "$cur")) } _aur_comp_reply_dirs () @@ -69,7 +69,7 @@ _aur_comp_reply_set() { local IFS=', ' local array_list="" array_name # shellcheck disable=2068 - for array_name in $@; do + for array_name in "$@"; do array_list="$array_list \${_aur_comp_var_${array_name}[*]}" done array_list="${array_list[*]:1}" diff --git a/aur.completor.bash b/shell-completions/aur.completor.bash index 48c6e8b..cb83422 100644 --- a/aur.completor.bash +++ b/shell-completions/aur.completor.bash @@ -4,6 +4,7 @@ cmd=aur cmd_args=@aur_pkgs cmd_opts=( -h --help + -v --version -l --list -f --force -g --git @@ -14,5 +15,5 @@ cmd_opts=( reply_aur_pkgs() { pkgs=$(basename -a ~/.aur/*/ | paste -d ' ' -s -) - COMPREPLY=( "$(compgen -W "$pkgs" -- "$cur")" ) + COMPREPLY=( $(compgen -W "$pkgs" -- "$cur") ) } diff --git a/aur.fish b/shell-completions/aur.fish index fea8e37..ae54b02 100644 --- a/aur.fish +++ b/shell-completions/aur.fish @@ -1,10 +1,11 @@ function _aur_no_switches - not __fish_contains_opt -s h help -s l list -s f force -s g git -s c config + not __fish_contains_opt -s h help -s v version -s l list -s f force -s g git -s c config end complete -c aur -f complete -c aur -n "_aur_no_switches" -a "(basename -a ~/.aur/*/)" complete -c aur -s h -l help +complete -c aur -s v -l version complete -c aur -s l -l list complete -c aur -s f -l force complete -c aur -s g -l git |
