aboutsummaryrefslogtreecommitdiff
path: root/shell-completions/aur.completor.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 /shell-completions/aur.completor.bash
parentfix: only run `git diff` when _update has pulled changes (diff)
downloadaur-82e1f3835335d143bbbf8cb0378ff36822ea9483.tar.gz
feat: add -v/--version option
Diffstat (limited to 'shell-completions/aur.completor.bash')
-rw-r--r--shell-completions/aur.completor.bash19
1 files changed, 19 insertions, 0 deletions
diff --git a/shell-completions/aur.completor.bash b/shell-completions/aur.completor.bash
new file mode 100644
index 0000000..cb83422
--- /dev/null
+++ b/shell-completions/aur.completor.bash
@@ -0,0 +1,19 @@
+# shellcheck disable=SC2034
+output=aur-completion.bash
+cmd=aur
+cmd_args=@aur_pkgs
+cmd_opts=(
+ -h --help
+ -v --version
+ -l --list
+ -f --force
+ -g --git
+ -c:@files
+ --config:@files
+)
+
+reply_aur_pkgs() {
+ pkgs=$(basename -a ~/.aur/*/ | paste -d ' ' -s -)
+
+ COMPREPLY=( $(compgen -W "$pkgs" -- "$cur") )
+}