]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bash-completion: don't sort syslog priorities
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 25 Apr 2019 17:37:54 +0000 (19:37 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 26 Apr 2019 06:04:15 +0000 (08:04 +0200)
By default, the available completions are sorted alphabetically, which
is counterproductive in case of syslog priorities. Override the default
behavior using the `nosort` option

shell-completion/bash/journalctl

index 53ffaacdb55b66dbead1d50aefb321a0c69c4b88..d4aba59450bdcb4e0ecc50b984abf87d6805900b 100644 (file)
@@ -83,6 +83,7 @@ _journalctl() {
                 ;;
             --priority|-p)
                 comps=${__syslog_priorities[*]}
+                compopt -o nosort
                 ;;
             --unit|-u)
                 comps=$(journalctl -F '_SYSTEMD_UNIT' 2>/dev/null)