[Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-512-g9717124

Ville Skyttä ville.skytta at iki.fi
Sat Nov 5 18:19:02 UTC 2011


On 11/05/2011 06:48 PM, Igor Murzov wrote:
> The following commit has been merged in the master branch:
> commit 9717124ab7bad30b6d8ba02ef91850c6bb74dd63
> Author: Igor Murzov <e-mail at date.by>
> Date:   Sat Nov 5 20:13:05 2011 +0300
> 
>     service, _services: Make these work on Slackware GNU/Linux.

The two changes below cause a regression: for example on Fedora/Red Hat
boxes, there's both /etc/init.d and /etc/rc.d/init.d (both pointing to
the same place), and as a consequence of this patch, we now get
completions only for the /etc/rc.d/init.d ones and not the /etc/init.d
ones.  The /etc/rc.d/init.d ones are more rarely typed by people if I
guess correctly, but both should continue to work as they did before.

> @@ -1843,7 +1857,7 @@ _completion_loader()
>      [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
>  
>      # Special case for init.d scripts.
> -    if [[ $1 == /etc?(/rc.d)/init.d/* ]]; then
> +    if [[ "$1" == $( _sysvdir )/* ]]; then
>          . "$compdir/service" &>/dev/null && return 124 || return 1
>      fi
> @@ -26,7 +24,7 @@ _service()
>      return 0
>  } &&
>  complete -F _service service
> -for svc in /etc/init.d/!($_backup_glob) /etc/rc.d/init.d/!($_backup_glob); do
> +for svc in $( _sysvdir )/!($_backup_glob); do
>      [ -x "$svc" ] && complete -F _service $svc
>  done
>  unset svc
> 





More information about the Bash-completion-devel mailing list