diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-06 14:00:04 +0200 |
|---|---|---|
| committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-06 14:00:04 +0200 |
| commit | a9873c872755cbf8dde60f200fc6d982f29794e4 (patch) | |
| tree | bc4f3ecf6738ea5e5fca57d29fbe898494b51a1b /bash_completion | |
| parent | 9717124ab7bad30b6d8ba02ef91850c6bb74dd63 (diff) | |
| download | bash-completion-a9873c872755cbf8dde60f200fc6d982f29794e4.tar.gz | |
Revert "service, _services: Make these work on Slackware GNU/Linux."
This reverts commit 9717124ab7bad30b6d8ba02ef91850c6bb74dd63.
See http://thread.gmane.org/gmane.comp.shells.bash.completion.scm/2278
Diffstat (limited to 'bash_completion')
| -rw-r--r-- | bash_completion | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/bash_completion b/bash_completion index 629afbc5..1ef70305 100644 --- a/bash_completion +++ b/bash_completion @@ -1039,26 +1039,12 @@ _gids() # _backup_glob='@(#*#|*@(~|.@(bak|orig|rej|swp|dpkg*|rpm@(orig|new|save))))' -# This function sets correct SysV init directory -# -_sysvdir() -{ - if [ -f /etc/slackware-version ]; then - # Slackware uses /etc/rc.d - echo /etc/rc.d - elif [ -d /etc/rc.d/init.d ]; then - echo /etc/rc.d/init.d - else - echo /etc/init.d - fi -} - # This function completes on services # _services() { local sysvdir famdir - sysvdir=$( _sysvdir ) + [ -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 @@ -1857,7 +1843,7 @@ _completion_loader() [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions" # Special case for init.d scripts. - if [[ "$1" == $( _sysvdir )/* ]]; then + if [[ $1 == /etc?(/rc.d)/init.d/* ]]; then . "$compdir/service" &>/dev/null && return 124 || return 1 fi |
