bash-completion: journalctl add missing options

Also, this deprecates '--this-boot' option.
This commit is contained in:
Yu Watanabe 2018-01-10 16:35:25 +09:00
parent afcb2246be
commit 41053e9bdf

View file

@ -39,25 +39,25 @@ _journalctl() {
[STANDALONE]='-a --all --full --system --user
--disk-usage -f --follow --header
-h --help -l --local --new-id128 -m --merge --no-pager
--no-tail -q --quiet --setup-keys --this-boot --verify
--no-tail -q --quiet --setup-keys --verify
--version --list-catalog --update-catalog --list-boots
--show-cursor --dmesg -k --pager-end -e -r --reverse
--utc -x --catalog --no-full --force --dump-catalog
--flush --rotate --sync --no-hostname'
[ARG]='-b --boot --this-boot -D --directory --file -F --field
--flush --rotate --sync --no-hostname -N --fields'
[ARG]='-b --boot -D --directory --file -F --field -t --identifier
-M --machine -o --output -u --unit --user-unit -p --priority
--vacuum-size --vacuum-time --vacuum-files'
[ARGUNKNOWN]='-c --cursor --interval -n --lines -S --since -U --until
--after-cursor --verify-key -t --identifier
--root'
[ARGUNKNOWN]='-c --cursor --interval -n --lines -S --since -U --until
--after-cursor --verify-key
--vacuum-size --vacuum-time --vacuum-files --output-fields'
)
if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then
case $prev in
--boot|--this-boot|-b)
--boot|-b)
comps=$(journalctl -F '_BOOT_ID' 2>/dev/null)
;;
--directory|-D)
--directory|-D|--root)
comps=$(compgen -d -- "$cur")
compopt -o filenames
;;
@ -66,7 +66,7 @@ _journalctl() {
compopt -o filenames
;;
--output|-o)
comps='short short-full short-iso short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat'
comps='short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat'
;;
--field|-F)
comps=$(journalctl --fields | sort 2>/dev/null)