mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
feat(aa-log): update shell completion.
This commit is contained in:
parent
2e466bab20
commit
eddcd0ecce
@ -3,7 +3,7 @@
|
||||
_aa-log() {
|
||||
COMPREPLY=()
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local args=(-f -s -h)
|
||||
local args=(-f --file -s --systemd -h --help)
|
||||
local lastarg="${COMP_WORDS[$COMP_CWORD-1]}"
|
||||
COMPREPLY+=($(compgen -W "${args[*]}" -- ${cur}))
|
||||
if [[ $lastarg == "-f" ]]; then
|
||||
|
@ -4,9 +4,9 @@
|
||||
_aa-log() {
|
||||
local IFS=$'\n'
|
||||
_arguments : \
|
||||
-f'[set a logfile or a prefix to the default log file]:FILE:__aa_files' \
|
||||
-s'[parse systemd dbus logs]' \
|
||||
-h'[display help information]'
|
||||
{-f,--file}'[set a logfile or a suffix to the default log file]:FILE:__aa_files' \
|
||||
{-s,--systemd}'[parse systemd logs from journalctl]' \
|
||||
{-h,--help}'[display help information]'
|
||||
|
||||
_values -C 'profile names' ${$(__aa_profiles):-""}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user