mirror of
https://github.com/systemd/systemd
synced 2024-07-22 02:34:54 +00:00
bash-completion: autocomplete cgroup names in systemd-cgtop
This commit is contained in:
parent
5ad8116a87
commit
0a152619ac
|
@ -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…
Reference in a new issue