mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Add completion for tuned-adm
(#8760)
* Add completion for `tuned-adm` This is part of `tuned` package * Update tuned-adm.fish
This commit is contained in:
parent
280727073a
commit
30dcd18afb
1 changed files with 24 additions and 0 deletions
24
share/completions/tuned-adm.fish
Normal file
24
share/completions/tuned-adm.fish
Normal file
|
@ -0,0 +1,24 @@
|
|||
#disable file seletion
|
||||
complete -f tuned-adm
|
||||
|
||||
#get profile list
|
||||
set profiles (tuned-adm list 2>&1 < /dev/null | awk '{print $2}' | tail -n +2 | head -n -1)
|
||||
|
||||
# all tuned-adm actions
|
||||
set -l actions list available profiles active off profile profile_info recommend verify auto_profile profile_mode
|
||||
|
||||
#first argument
|
||||
complete -k -c tuned-adm -n "test (__fish_number_of_cmd_args_wo_opts) = 1" \
|
||||
-xa "$actions"
|
||||
|
||||
# second argument for profile subcommand
|
||||
complete -k -c tuned-adm -n "test (__fish_number_of_cmd_args_wo_opts) = 2; and __fish_seen_subcommand_from profile" \
|
||||
-xa "$profiles"
|
||||
|
||||
#options
|
||||
complete -k -c tuned-adm -s h -l help -d "show this help message and exit"
|
||||
complete -k -c tuned-adm -s v -l version -d "show program's version number and exit"
|
||||
complete -k -c tuned-adm -s d -l debug -d "show debug messages"
|
||||
complete -k -c tuned-adm -s a -l async -d "with dbus do not wait on commands completion and return immediately"
|
||||
complete -k -c tuned-adm -s t -l timeout -d "with sync operation use specific timeout instead of the default 600 second(s)"
|
||||
complete -k -c tuned-adm -s l -l loglevel -d "level of log messages to capture"
|
Loading…
Reference in a new issue