mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
bash-completion: autocomplete cgroup names in systemd-cgtop
(cherry picked from commit 0a152619aca5b6c16d022cc3e6ab2fc3786d0284)
This commit is contained in:
parent
9f2f391153
commit
5219a99ccb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user