summaryrefslogtreecommitdiff
path: root/bash_completion
diff options
context:
space:
mode:
Diffstat (limited to 'bash_completion')
-rw-r--r--bash_completion32
1 files changed, 4 insertions, 28 deletions
diff --git a/bash_completion b/bash_completion
index 1ef70305..bfd38a27 100644
--- a/bash_completion
+++ b/bash_completion
@@ -47,6 +47,10 @@ readonly BASH_COMPLETION_COMPAT_DIR
#
_blacklist_glob='@(acroread.sh)'
+# Glob for matching various backup files.
+#
+_backup_glob='@(#*#|*@(~|.@(bak|orig|rej|swp|dpkg*|rpm@(orig|new|save))))'
+
# Turn on extended globbing and programmable completion
shopt -s extglob progcomp
@@ -1035,34 +1039,6 @@ _gids()
fi
}
-# Glob for matching various backup files.
-#
-_backup_glob='@(#*#|*@(~|.@(bak|orig|rej|swp|dpkg*|rpm@(orig|new|save))))'
-
-# This function completes on services
-#
-_services()
-{
- 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
-
- COMPREPLY=( $( printf '%s\n' $sysvdir/!($_backup_glob|functions) ) )
-
- if [ -d $famdir ]; then
- COMPREPLY+=( $( printf '%s\n' $famdir/!($_backup_glob) ) )
- fi
-
- $restore_nullglob
-
- COMPREPLY+=( $( systemctl list-units --full --all 2>/dev/null | \
- awk '$1 ~ /\.service$/ { sub("\\.service$", "", $1); print $1 }' ) )
-
- COMPREPLY=( $( compgen -W '${COMPREPLY[@]#@($sysvdir|$famdir)/}' -- "$cur" ) )
-}
-
# This function completes on modules
#
_modules()