[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-69-g7c34b56
Ville Skyttä
ville.skytta at iki.fi
Tue Apr 12 17:29:36 UTC 2011
The following commit has been merged in the master branch:
commit 770bcdf71d2b301a74473cd85781c214c83635dd
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Tue Apr 12 20:11:39 2011 +0300
Install full path /etc/rc.d/init.d/* completions.
diff --git a/CHANGES b/CHANGES
index 189eaf9..8e405a0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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)
diff --git a/completions/service b/completions/service
index a912f55..a2a28a5 100644
--- a/completions/service
+++ b/completions/service
@@ -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
--
bash-completion
More information about the Bash-completion-commits
mailing list