diff options
author | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2014-01-29 12:47:56 +0800 |
---|---|---|
committer | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2014-01-29 12:47:56 +0800 |
commit | 8fbffe250a18e0bd468f2d3c894917c3d9eaa5c0 (patch) | |
tree | e5741eb678b962a8315340cb3c88e13ae20eb924 /share/functions/__fish_print_packages.fish | |
parent | 60808a4820b1714499f601ed78f0ae903bdb779f (diff) |
__fish_print_packages: correct syntax for yum, improve yum/rpm pipelines
Closes #1269 (output to cache file).
Reworks the editing pipeline for both yum and rpm completions down to a
single sed command.
Diffstat (limited to 'share/functions/__fish_print_packages.fish')
-rw-r--r-- | share/functions/__fish_print_packages.fish | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/functions/__fish_print_packages.fish b/share/functions/__fish_print_packages.fish index 95d5d6ca..f732a51f 100644 --- a/share/functions/__fish_print_packages.fish +++ b/share/functions/__fish_print_packages.fish @@ -46,7 +46,7 @@ function __fish_print_packages end # Remove package version information from output and pipe into cache file - /usr/share/yum-cli/completion-helper.py list all -d 0 -C >$cache_file | cut -d '.' -f 1 | sed '1d' | sed '/^\s/d' | sed -e 's/$/'\t$package'/' & + /usr/share/yum-cli/completion-helper.py list all -d 0 -C | sed "s/\..*/\t$package/" >$cache_file & end # Rpm is too slow for this job, so we set it up to do completions @@ -67,7 +67,7 @@ function __fish_print_packages end # Remove package version information from output and pipe into cache file - rpm -qa | sed -e 's/-[^-]*-[^-]*$//' | sed -e 's/$/'\t$package'/' >$cache_file & + rpm -qa |sed -e 's/-[^-]*-[^-]*$/\t'$package'/' >$cache_file & end # This completes the package name from the portage tree. |