mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
remove sed (and awk) from gentoo-portage completions
This commit is contained in:
parent
70c80c9d0e
commit
02ae926c8e
2 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
function __fish_portage_print_repository_names --description 'Print the names of all configured repositories'
|
||||
# repos.conf may be a file or a directory
|
||||
find /etc/portage/repos.conf -type f -exec sed -ne '/^[[:blank:]]*\[[[:alnum:]_][[:alnum:]_-]*\]/{s!^.*\[\(.*\)\].*$!\1!; /DEFAULT/!p}' '{}' +
|
||||
find /etc/portage/repos.conf -type f -exec cat '{}' + | string replace -r --filter '^\s*\[([[:alnum:]_][[:alnum:]_-]*)\]' '$1' | string match -v -e DEFAULT
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function __fish_portage_print_repository_paths --description 'Print the paths of all configured repositories'
|
||||
# repos.conf may be a file or a directory
|
||||
find /etc/portage/repos.conf -type f -exec awk 'BEGIN { FS="[[:blank:]]*=[[:blank:]]*" } $1 == "location" { print $2 }' '{}' +
|
||||
find /etc/portage/repos.conf -type f -exec cat '{}' + | string replace -r --filter '^\s*location\s*=\s*(\S+)' '$1'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue