bash-completion: journalctl add missing options
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 10 Jan 2018 07:35:25 +0000 (16:35 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 10 Jan 2018 14:16:14 +0000 (23:16 +0900)
Also, this deprecates '--this-boot' option.

shell-completion/bash/journalctl

index 03ee733..d2b9a04 100644 (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)