mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
__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.
This commit is contained in:
parent
60808a4820
commit
8fbffe250a
1 changed files with 2 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue