From 9c44d4f55c9e8af6975e6234e7c50bf88c1c8095 Mon Sep 17 00:00:00 2001 From: Alex Butler Date: Wed, 11 Apr 2018 18:50:51 +0100 Subject: [PATCH] Add fish completion --- completion/fish/aurto.fish | 9 +++++++++ makefile | 1 + 2 files changed, 10 insertions(+) create mode 100644 completion/fish/aurto.fish diff --git a/completion/fish/aurto.fish b/completion/fish/aurto.fish new file mode 100644 index 0000000..937d6e0 --- /dev/null +++ b/completion/fish/aurto.fish @@ -0,0 +1,9 @@ +function _aurto_no_command + set cmd (commandline -opc) + if [ (count $cmd) -eq 1 -a $cmd[1] = 'aurto' ] + return 0 + end + return 1 +end + +complete -f -c aurto -n '_aurto_no_command' -a 'add addpkg remove' diff --git a/makefile b/makefile index 9875f05..5f064c2 100644 --- a/makefile +++ b/makefile @@ -12,5 +12,6 @@ all: @install -D timer/* -t target$(PREFIX)/lib/systemd/system @install -D completion/bash/aurto target$(PREFIX)/share/bash-completion/completions/aurto + @install -D completion/fish/aurto.fish target$(PREFIX)/share/fish/completions/aurto.fish @if command -v tree >/dev/null 2>&1; then tree target; fi