aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/completions
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2016-05-19 14:52:38 +0200
committerGravatar Fabian Homborg <FHomborg@gmail.com>2016-05-19 14:52:38 +0200
commit573b3797a507c3912197ebd4f2df0dc0398d3826 (patch)
tree7dd1e3e4f653a4546dfd6b3d41e83d55d45079c2 /share/completions
parenta0b3b8ac4c010e47197c7d4a4a9627337255707e (diff)
Improve asp's package completion
Diffstat (limited to 'share/completions')
-rw-r--r--share/completions/asp.fish10
1 files changed, 7 insertions, 3 deletions
diff --git a/share/completions/asp.fish b/share/completions/asp.fish
index b95b914d..8308f235 100644
--- a/share/completions/asp.fish
+++ b/share/completions/asp.fish
@@ -17,6 +17,10 @@ complete -c asp -n "not __fish_seen_subcommand_from $commands" -a show -d "Show
complete -c asp -n "not __fish_seen_subcommand_from $commands" -a update -d "Update given targets" -f
complete -c asp -n "not __fish_seen_subcommand_from $commands" -a untrack -d "Remove target from local repository" -f
-# This isn't perfect as we need a pkgbase, not a pkgname,
-# but getting those is non-trivial as built packages don't carry the information anymore
-complete -c asp -n "__fish_seen_subcommand_from $commands" -a "(__fish_print_packages)" -f
+# Remove pointless "packages/" or "community/" before package names
+# Don't show foreign packages for untrack, and show no packages at all for gc, help, disk-usage, list-{all,local}
+# This will run into the description race.
+complete -c asp -n "__fish_seen_subcommand_from checkout {diff,short,}log export list-{arches,repos} show update" -a "(asp list-all | string replace -r '.*/' '')" -f
+complete -c asp -n "__fish_seen_subcommand_from checkout {diff,short,}log export list-{arches,repos} show update untrack" -a "(asp list-local | string replace -r '.*/' '')" -f \
+-d "Locally tracked package"
+