aboutsummaryrefslogtreecommitdiff
path: root/aur-completion.bash
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2024-12-21 23:43:51 +0100
committerpml68 <contact@pml68.dev>2024-12-21 23:43:51 +0100
commitbb8c38604010777c1bf1c23a372cf6a522a6ba4e (patch)
treebfb04316acc0ee2f902178067209dad75e79e728 /aur-completion.bash
parentfix: script running `_clean` in PWD (diff)
downloadaur-bb8c38604010777c1bf1c23a372cf6a522a6ba4e.tar.gz
feat: exit with code 16 when unknown switch is used
Diffstat (limited to 'aur-completion.bash')
-rw-r--r--aur-completion.bash8
1 files changed, 2 insertions, 6 deletions
diff --git a/aur-completion.bash b/aur-completion.bash
index f8938f9..554e106 100644
--- a/aur-completion.bash
+++ b/aur-completion.bash
@@ -17,12 +17,8 @@ _aur_comp_cmd_opts=( -h --help -l --list -f --force -g --git -c --config )
_aur_comp_reply_aur_pkgs ()
{
- pkgs=($(find ~/.aur/ -type d -mindepth 1 -maxdepth 1));
- for i in "${!pkgs[@]}";
- do
- pkgs[$i]=$(basename "${pkgs[$i]}");
- done;
- COMPREPLY=($(compgen -W "${pkgs[*]}" -- "$cur"))
+ pkgs=`basename -a ~/.aur/*/ | paste -d ' ' -s -`;
+ COMPREPLY=($(compgen -W "$pkgs" -- "$cur"))
}
_aur_comp_reply_dirs ()