feat(aa-log): update shell completion.

This commit is contained in:
Alexandre Pujol 2023-04-19 19:02:42 +01:00
parent 2e466bab20
commit eddcd0ecce
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@
_aa-log() { _aa-log() {
COMPREPLY=() COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}" 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]}" local lastarg="${COMP_WORDS[$COMP_CWORD-1]}"
COMPREPLY+=($(compgen -W "${args[*]}" -- ${cur})) COMPREPLY+=($(compgen -W "${args[*]}" -- ${cur}))
if [[ $lastarg == "-f" ]]; then if [[ $lastarg == "-f" ]]; then

View file

@ -4,9 +4,9 @@
_aa-log() { _aa-log() {
local IFS=$'\n' local IFS=$'\n'
_arguments : \ _arguments : \
-f'[set a logfile or a prefix to the default log file]:FILE:__aa_files' \ {-f,--file}'[set a logfile or a suffix to the default log file]:FILE:__aa_files' \
-s'[parse systemd dbus logs]' \ {-s,--systemd}'[parse systemd logs from journalctl]' \
-h'[display help information]' {-h,--help}'[display help information]'
_values -C 'profile names' ${$(__aa_profiles):-""} _values -C 'profile names' ${$(__aa_profiles):-""}
} }