1
0
Fork 0
tuned/tuned-adm.bash
Jaroslav Škarvada 8e085e7228 bash-completion: added support for 'tuned-adm verify'
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2015-07-10 16:00:34 +02:00

19 lines
511 B
Bash

# bash completion for tuned-adm
_tuned_adm()
{
local commands="active list off profile recommend verify"
local cur prev words cword
_init_completion || return
if [[ "$cword" -eq 1 ]]; then
COMPREPLY=( $(compgen -W "$commands" -- "$cur" ) )
elif [[ "$cword" -eq 2 && "$prev" == "profile" ]]; then
COMPREPLY=( $(compgen -W "$(command find /usr/lib/tuned /etc/tuned -mindepth 1 -maxdepth 1 -type d -printf "%f\n")" -- "$cur" ) )
else
COMPREPLY=()
fi
return 0
} &&
complete -F _tuned_adm tuned-adm