mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
completions/service: Fix output on OpenRC systems
This used `type -f`, which prints, and only silenced stderr. Detected by running the check-completions test on Alpine. It appears nobody does that.
This commit is contained in:
parent
e4c7211cd6
commit
e6f4c9e162
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ complete -c service -n "__fish_is_nth_token 1" -xa "(__fish_print_service_names)
|
|||
# as found in __fish_print_service_names.fish
|
||||
if test -d /run/systemd/system # Systemd systems
|
||||
complete -c service -n 'not __fish_is_nth_token 1' -xa "start stop restart status enable disable"
|
||||
else if type -f rc-service 2>/dev/null # OpenRC (Gentoo)
|
||||
else if command -sq rc-service # OpenRC (Gentoo)
|
||||
complete -c service -n 'not __fish_is_nth_token 1' -xa "start stop restart"
|
||||
else if test -d /etc/init.d # SysV on Debian and other linuxen
|
||||
complete -c service -n 'not __fish_is_nth_token 1' -xa "start stop --full-restart"
|
||||
|
|
Loading…
Reference in a new issue