Install full path /etc/rc.d/init.d/* completions.

This commit is contained in:
Ville Skyttä 2011-04-12 20:11:39 +03:00
parent c42aa0b424
commit 770bcdf71d
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ bash-completion (2.x)
* Add $_backup_glob for matching various backup files.
* Load and general speedups.
* Install only full path (no basename) completions for /etc/init.d/*.
* Install full path /etc/rc.d/init.d/* completions.
[ Guillaume Rousse ]
* added puppet completion, using work from Mathieu Parent (sathieudebian.org)

View File

@ -4,7 +4,7 @@
# 'service' command and/or the SysV init.d directory, followed by
# that script's available commands
[ -d /etc/init.d ] || have service || return
[[ -d /etc/init.d || -d /etc/rc.d/init.d ]] || have service || return
_service()
{
@ -29,7 +29,7 @@ _service()
return 0
} &&
complete -F _service service
for svc in /etc/init.d/*; do
for svc in /etc/init.d/* /etc/rc.d/init.d/*; do
[ -x "$svc" ] && complete -F _service $svc
done
unset svc