diff options
author | Luca Boccassi <bluca@debian.org> | 2022-08-16 23:04:40 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2022-08-18 12:58:12 +0100 |
commit | 0a152619aca5b6c16d022cc3e6ab2fc3786d0284 (patch) | |
tree | 71451e56c56daa2219c18e11dd4a41f92e3b94c9 /shell-completion | |
parent | 5ad8116a87fb2dd63cc935ec36321e7356061b54 (diff) | |
download | systemd-0a152619aca5b6c16d022cc3e6ab2fc3786d0284.tar.gz |
bash-completion: autocomplete cgroup names in systemd-cgtop
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/systemd-cgtop | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shell-completion/bash/systemd-cgtop b/shell-completion/bash/systemd-cgtop index c909260098..ca0a51e949 100644 --- a/shell-completion/bash/systemd-cgtop +++ b/shell-completion/bash/systemd-cgtop @@ -56,6 +56,11 @@ _systemd_cgtop() { fi COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") ) + if [ -d /sys/fs/cgroup/systemd/ ]; then + COMPREPLY+=( $(cd /sys/fs/cgroup/systemd/ && compgen -o nospace -o dirnames "$cur") ) + elif [ -d /sys/fs/cgroup/ ]; then + COMPREPLY+=( $(cd /sys/fs/cgroup/ && compgen -o nospace -o dirnames "$cur") ) + fi } complete -F _systemd_cgtop systemd-cgtop |