service: Always include start and stop in service command completions.

Not all services are in /etc/init.d files (such as systemd ones) from
which command completions can be parsed from.
This commit is contained in:
Ville Skyttä 2011-06-18 23:26:57 +03:00
parent 472b5bb958
commit ccb8c91803

View File

@ -22,7 +22,7 @@ _service()
sysvdir=/etc/rc.d/init.d || sysvdir=/etc/init.d
COMPREPLY=( $( compgen -W '`sed -e "y/|/ /" \
-ne "s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p" \
$sysvdir/${prev##*/} 2>/dev/null`' -- "$cur" ) )
$sysvdir/${prev##*/} 2>/dev/null` start stop' -- "$cur" ) )
fi
return 0