aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_print_packages.fish
diff options
context:
space:
mode:
authorGravatar James French <frenchie@frenchie.id.au>2013-06-04 20:56:37 +0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-06-17 00:14:16 -0700
commit292908c00a166d2989efc1d1508a067bb49b88ca (patch)
tree8b106c6e41659e13fe8800294dc51e69ef1a56ca /share/functions/__fish_print_packages.fish
parente027492e11441e9350dd45894d9815bd3ba83cc7 (diff)
Portmaster completions
* Added FreeBSD's pkg to __fish_print_packages * Portmaster completes on installed packages and ports * Options list as per fish_generate_completions, needs to be tidied up further but will suffice for now
Diffstat (limited to 'share/functions/__fish_print_packages.fish')
-rw-r--r--share/functions/__fish_print_packages.fish11
1 files changed, 11 insertions, 0 deletions
diff --git a/share/functions/__fish_print_packages.fish b/share/functions/__fish_print_packages.fish
index 6ee76c55..95a822c7 100644
--- a/share/functions/__fish_print_packages.fish
+++ b/share/functions/__fish_print_packages.fish
@@ -22,6 +22,17 @@ function __fish_print_packages
return
end
+ # Pkg is fast on FreeBSD and provides versioning info which we want for
+ # installed packages
+ if begin
+ type -f pkg > /dev/null
+ and test (uname) = "FreeBSD"
+ end
+ pkg query "%n-%v"
+ return
+ end
+
+
# yum is slow, just like rpm, so go to the background
if type -f /usr/share/yum-cli/completion-helper.py >/dev/null