mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix portmaster completions when there are no matches
Don't spew warnings when there are no matches. Also, use the string builtin instead of calling sed. Fixes #3949
This commit is contained in:
parent
252c821cb3
commit
ed6298ad17
1 changed files with 1 additions and 2 deletions
|
@ -48,8 +48,7 @@ complete -c portmaster -l version --description 'display the version number El E
|
|||
# Grab items from the ports directory, max depth 2
|
||||
complete -c portmaster -f --description 'Ports Directory' -a "
|
||||
(
|
||||
ls -d /usr/ports/(commandline -ct)*/ \
|
||||
| sed -E -e 's#/usr/ports/##' -e 's#/+#/#' -e 's#([^/]+/[^/]+).*#\1#'
|
||||
string match -r '(?<=/usr/ports/)[^/]*(?:/[^/]*)?' (__fish_complete_directories /usr/ports/(commandline -ct))
|
||||
)"
|
||||
|
||||
complete -c portmaster -f --description 'Installed Package' -a "(__fish_print_packages)"
|
||||
|
|
Loading…
Reference in a new issue