diff options
| author | Igor Murzov <e-mail@date.by> | 2011-11-09 04:49:37 +0300 |
|---|---|---|
| committer | Igor Murzov <e-mail@date.by> | 2011-11-09 04:49:37 +0300 |
| commit | fff412b2f2b83e10de8644acbb90535355b39b93 (patch) | |
| tree | aa8b6f1258e2f6f4be05329cf34cfeec6dca99fa /bash_completion | |
| parent | cb0526cb015d74576bda9c1c994cedc8f77f8829 (diff) | |
| download | bash-completion-fff412b2f2b83e10de8644acbb90535355b39b93.tar.gz | |
Revert "Another stab at making service completion work on Slackware."
This reverts commit 1a01e54d856fe2d9496cfaf6d9df8b75d87a9b52.
See http://thread.gmane.org/gmane.comp.shells.bash.completion.scm/2278
Diffstat (limited to 'bash_completion')
| -rw-r--r-- | bash_completion | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/bash_completion b/bash_completion index 44f74c07..9a7eb9f2 100644 --- a/bash_completion +++ b/bash_completion @@ -1043,12 +1043,9 @@ _backup_glob='@(#*#|*@(~|.@(bak|orig|rej|swp|dpkg*|rpm@(orig|new|save))))' # _services() { - local sysvdir=/etc/init.d famdir=/etc/xinetd.d - if [[ -d /etc/rc.d/init.d ]]; then - sysvdir=/etc/rc.d/init.d - elif [[ -f /etc/slackware-version ]]; then - sysvdir=/etc/rc.d - fi + local sysvdir famdir + [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d || sysvdir=/etc/init.d + famdir=/etc/xinetd.d local restore_nullglob=$(shopt -p nullglob); shopt -s nullglob @@ -1841,8 +1838,7 @@ _completion_loader() [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions" # Special case for init.d scripts. - if [[ $1 == /etc?(/rc.d)/init.d/* || \ - ( $1 == /etc/rc.d/* && -f /etc/slackware-version ) ]]; then + if [[ $1 == /etc?(/rc.d)/init.d/* ]]; then . "$compdir/service" &>/dev/null && return 124 || return 1 fi |
