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
This commit is contained in:
James French
2013-06-04 20:56:37 +08:00
committed by ridiculousfish
parent e027492e11
commit 292908c00a
2 changed files with 66 additions and 0 deletions

View File

@@ -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