summaryrefslogtreecommitdiff
path: root/bash_completion
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-06-18 23:26:19 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-06-18 23:26:19 +0300
commit472b5bb9588e0ae7bbf576ca355ebc9dae415eed (patch)
tree1c5f8f7a8343d971779c730fbe50ab6bf2ad4210 /bash_completion
parent50d44ca3a4d712845d6e40c624f23ac9cd851c18 (diff)
downloadbash-completion-472b5bb9588e0ae7bbf576ca355ebc9dae415eed.tar.gz
_services: Include systemd services.
Diffstat (limited to 'bash_completion')
-rw-r--r--bash_completion3
1 files changed, 3 insertions, 0 deletions
diff --git a/bash_completion b/bash_completion
index 98c2fd77..819899ef 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1049,6 +1049,9 @@ _services()
$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" ) )
}