Commit abde247c authored by Jaroslav Škarvada's avatar Jaroslav Škarvada

Added bash-completion for tuned-adm

parent d6ff00ee
......@@ -52,6 +52,10 @@ install:
mkdir -p $(DESTDIR)$(TUNED_PROFILESDIR)
cp -a profiles/* $(DESTDIR)$(TUNED_PROFILESDIR)/
# Install bash completion
mkdir -p $(DESTDIR)/etc/bash_completion.d
install -m 0644 tuned.bash $(DESTDIR)/etc/bash_completion.d/tuned.bash
# log dir
mkdir -p $(DESTDIR)/var/log/tuned
......
# bash completion for tuned-adm
_tuned_adm()
{
local commands="help list active off profile"
local current="${COMP_WORDS[$COMP_CWORD]}"
local previous="${COMP_WORDS[$COMP_CWORD-1]}"
if [[ $COMP_CWORD -eq 1 ]]; then
COMPREPLY=( $(compgen -W "$commands" -- "$current" ) )
elif [[ $COMP_CWORD -eq 2 && "$previous" == "profile" ]]; then
COMPREPLY=( $(compgen -W "$(command ls -F /usr/lib/tuned | \
sed '/\/$/!d;s/.$//')" -- "$current" ) )
else
COMPREPLY=()
fi
return 0
} &&
complete -F _tuned_adm tuned-adm
......@@ -88,6 +88,7 @@ fi
%doc COPYING
%doc README
%doc doc/TIPS.txt
%{_sysconfdir}/bash_completion.d
%{python_sitelib}/tuned
%{_sbindir}/tuned
%{_sbindir}/tuned-adm
......@@ -137,6 +138,7 @@ fi
- Reduced number of installed profiles, others added into profiles-compat subpackage
- Added tuned_powertop_profile.py into utils subpackage
- Added tuned, tuned-adm man pages
- Added bash-completion
* Mon Mar 22 2012 Jan Kaluza <jkaluza@redhat.com> 2.0-0.2.alpha
- Added tuned-adm and tuned.cfg man page
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment