chore(aa-log): update shell completion.

This commit is contained in:
Alexandre Pujol 2023-10-10 20:44:50 +01:00
parent 1048283b5c
commit 0b412b5713
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
3 changed files with 4 additions and 2 deletions

View File

@ -15,7 +15,7 @@ import (
"golang.org/x/exp/slices"
)
const usage = `aa-log [-h] [--systemd] [--file file] [--rules] [profile]
const usage = `aa-log [-h] [--systemd] [--file file] [--rules | --raw] [profile]
Review AppArmor generated messages in a colorful way. Supports logs from
auditd, systemd, syslog as well as dbus session events.

View File

@ -3,7 +3,7 @@
_aa-log() {
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
local args=(-f --file -s --systemd -h --help)
local args=(-f --file -s --systemd -r --rules -R -raw -h --help)
local lastarg="${COMP_WORDS[$COMP_CWORD-1]}"
COMPREPLY+=($(compgen -W "${args[*]}" -- ${cur}))
if [[ $lastarg == "-f" ]]; then

View File

@ -6,6 +6,8 @@ _aa-log() {
_arguments : \
{-f,--file}'[set a logfile or a suffix to the default log file]:FILE:__aa_files' \
{-s,--systemd}'[parse systemd logs from journalctl]' \
{-r,--rules}'[convert the log into AppArmor rules]' \
{-R,--raw}'[print the raw log without any formatting]' \
{-h,--help}'[display help information]'
_values -C 'profile names' ${$(__aa_profiles):-""}