diff options
| author | pml68 <contact@pml68.dev> | 2024-12-21 11:19:11 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2024-12-21 11:19:11 +0100 |
| commit | 55fc35e62ef330b3c8722a50361b9c62dbba181f (patch) | |
| tree | f89b70c6874db6779248230ff9ea5d22f06c9813 /aur.completor.bash | |
| download | aur-55fc35e62ef330b3c8722a50361b9c62dbba181f.tar.gz | |
feat: initial commit
Diffstat (limited to '')
| -rw-r--r-- | aur.completor.bash | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/aur.completor.bash b/aur.completor.bash new file mode 100644 index 0000000..28117f4 --- /dev/null +++ b/aur.completor.bash @@ -0,0 +1,21 @@ +output=aur-completion.bash +cmd=aur +cmd_args=@aur_pkgs +cmd_opts=( + -h --help + -l --list + -f --force + -g --git + -c:@files + --config:@files +) + +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") ) +} |
