aboutsummaryrefslogtreecommitdiff
path: root/aur-completion.bash
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-09-03 18:42:44 +0200
committerpml68 <contact@pml68.dev>2025-09-03 20:00:18 +0200
commit82e1f3835335d143bbbf8cb0378ff36822ea9483 (patch)
tree8e55cab2cda1cc42df7c0a4c21392b2d6f4394bf /aur-completion.bash
parentfix: only run `git diff` when _update has pulled changes (diff)
downloadaur-82e1f3835335d143bbbf8cb0378ff36822ea9483.tar.gz
feat: add -v/--version option
Diffstat (limited to '')
-rw-r--r--shell-completions/aur-completion.bash (renamed from aur-completion.bash)6
1 files changed, 3 insertions, 3 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}"