From 8da66452eb3f0a08dd781b719872dd5b1aba1fda Mon Sep 17 00:00:00 2001 From: pml68 Date: Sun, 22 Dec 2024 00:12:51 +0100 Subject: docs: add fish completion directions to README --- README.md | 8 +++++++- aur-completion.fish | 11 ----------- aur.fish | 11 +++++++++++ 3 files changed, 18 insertions(+), 12 deletions(-) delete mode 100644 aur-completion.fish create mode 100644 aur.fish diff --git a/README.md b/README.md index 7363694..5b7d650 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,17 @@ My AUR helper. See `aur -h` -## Bash completion +## Shell completion +Bash ```sh cp aur-completion.bash ~/.aur-completion.bash # add this line to your .bashrc source ~/.aur-completion.bash ``` + +Fish +```sh +cp aur.fish ~/.config/fish/completions/ +``` diff --git a/aur-completion.fish b/aur-completion.fish deleted file mode 100644 index fea8e37..0000000 --- a/aur-completion.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _aur_no_switches - not __fish_contains_opt -s h help -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 l -l list -complete -c aur -s f -l force -complete -c aur -s g -l git -complete -c aur -s c -l config -F -r diff --git a/aur.fish b/aur.fish new file mode 100644 index 0000000..fea8e37 --- /dev/null +++ b/aur.fish @@ -0,0 +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 +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 l -l list +complete -c aur -s f -l force +complete -c aur -s g -l git +complete -c aur -s c -l config -F -r -- cgit v1.2.3