diff --git a/CHANGES b/CHANGES index d35144a5..189eaf9c 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ bash-completion (2.x) * Split rpm and rpmbuild completions and improve them both. * Add $_backup_glob for matching various backup files. * Load and general speedups. + * Install only full path (no basename) completions for /etc/init.d/*. [ Guillaume Rousse ] * added puppet completion, using work from Mathieu Parent (sathieudebian.org) diff --git a/completions/service b/completions/service index d49a6688..a912f55c 100644 --- a/completions/service +++ b/completions/service @@ -13,10 +13,6 @@ _service() COMPREPLY=() _get_comp_words_by_ref cur prev - # don't complete for things like killall, ssh and mysql if it's - # the standalone command, rather than the init script - [[ ${COMP_WORDS[0]} != @(*init.d/!(functions|~)|service) ]] && return 0 - # don't complete past 2nd token [ $COMP_CWORD -gt 2 ] && return 0 @@ -34,8 +30,7 @@ _service() } && complete -F _service service for svc in /etc/init.d/*; do - [ ! -x "$svc" ] || complete -p "${svc##*/}" &>/dev/null || \ - complete -F _service -o default "${svc##*/}" + [ -x "$svc" ] && complete -F _service $svc done unset svc