bash-completion: don't sort syslog priorities
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 25 Apr 2019 17:37:54 +0000 (19:37 +0200)
committerMichael Biebl <biebl@debian.org>
Thu, 29 Aug 2019 14:18:18 +0000 (15:18 +0100)
By default, the available completions are sorted alphabetically, which
is counterproductive in case of syslog priorities. Override the default
behavior using the `nosort` option

(cherry picked from commit f8f542482e1df9b99144becf74dfae13a4d4403d)

Gbp-Pq: Name bash-completion-don-t-sort-syslog-priorities.patch

shell-completion/bash/journalctl

index 3beb347e1b756bc0f3bd1f3160c16ae1501dcad2..51e1e6a18cb90b583de23755e46dd5baa6d290be 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)