aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-09-29 16:36:06 +0200
committerGravatar Fabian Homborg <FHomborg@gmail.com>2015-10-04 15:41:20 +0200
commit55a2945449e7ad02cafd8b35eb7eec32e7c72cf8 (patch)
treea4f805448a4d384c4e0adcb4ccc0fcbb4938515c
parent16061d06a91b4ac7aa97819a3b0a2d9af5e413ab (diff)
Bring aura completions in line with pacman
Eliminates a bit of __fish_sgrep
-rw-r--r--share/completions/aura.fish26
1 files changed, 13 insertions, 13 deletions
diff --git a/share/completions/aura.fish b/share/completions/aura.fish
index 9f5e6435..d5b81dbb 100644
--- a/share/completions/aura.fish
+++ b/share/completions/aura.fish
@@ -5,19 +5,19 @@ set -l listall "(__fish_print_packages)"
set -l listrepos "(__fish_print_pacman_repos)"
set -l listgroups "(pacman -Sg | sed 's/\(.*\)/\1\tPackage group/g')"
-set -l noopt 'commandline | not __fish_sgrep -qe "-[a-z]*[ABCDLMOQRSTU]\|--aursync\|--save\|--downgrade\|--viewlog\|--abssync\|--orphans\|--database\|--query\|--sync\|--remove\|--upgrade\|--deptest"'
-set -l database 'commandline | __fish_sgrep -qe "-[a-z]*D\|--database"'
-set -l query 'commandline | __fish_sgrep -qe "-[a-z]*Q\|--query"'
-set -l remove 'commandline | __fish_sgrep -qe "-[a-z]*R\|--remove"'
-set -l sync 'commandline | __fish_sgrep -qe "-[a-z]*S\|--sync"'
-set -l upgrade 'commandline | __fish_sgrep -qe "-[a-z]*U\|--upgrade"'
-set -l aur 'commandline | __fish_sgrep -qe "-[a-z]*A\|--aursync"'
-set -l abs 'commandline | __fish_sgrep -qe "-[a-z]*M\|--abssync"'
-set -l save 'commandline | __fish_sgrep -qe "-[a-z]*B\|--save"'
-set -l downgrade 'commandline | __fish_sgrep -qe "-[a-z]*C\|--downgrade"'
-set -l orphans 'commandline | __fish_sgrep -qe "-[a-z]*O\|--orphans"'
-set -l logfile 'commandline | __fish_sgrep -qe "-[a-z]*L\|--viewlog"'
-set -l search 'commandline | __fish_sgrep -qe "-[a-zA]*s\|--search"'
+set -l noopt 'not __fish_contains_opt -s S -s D -s Q -s R -s U -s T -s A -s B -s C -s L -s M -s O database query sync remove upgrade deptest aursync save downgrade viewlog abssync orphans'
+set -l database '__fish_contains_opt -s D database'
+set -l query '__fish_contains_opt -s Q query'
+set -l remove '__fish_contains_opt -s R remove'
+set -l sync '__fish_contains_opt -s S sync'
+set -l upgrade '__fish_contains_opt -s U upgrade'
+set -l aur '__fish_contains_opt -s A aursync'
+set -l abs '__fish_contains_opt -s M abssync'
+set -l save '__fish_contains_opt -s B save'
+set -l downgrade '__fish_contains_opts -s C downgrade'
+set -l orphans '__fish_contains_opt -s O orphans'
+set -l logfile '__fish_contains_opt -s L viewlog'
+set -l search '__fish_contains_opt -s s search'
# By default fish expands the arguments with the option which is not desired
# due to performance reasons.