summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_postfix8
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 863a58682..4d2de8d86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-08-30  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 39108: Completion/Unix/Command/_postfix: Support
+	$enable_long_queue_ids.
+
 	* 39110: Completion/Unix/Command/_postfix: Complete 'postconf'.
 
 	* 39107: Completion/Unix/Command/_postfix: Complete
diff --git a/Completion/Unix/Command/_postfix b/Completion/Unix/Command/_postfix
index 8880dbf90..ab9518212 100644
--- a/Completion/Unix/Command/_postfix
+++ b/Completion/Unix/Command/_postfix
@@ -7,7 +7,13 @@ typeset -A opt_args
 integer NORMARG
 
 _postfix_queue_id() {
-  compadd "$@" -- ${${(M)${(f)"$(_call_program mailq 'mailq')"}:#(#s)([0-9A-F]##)*}/(#s)(#b)([0-9A-F]##)*/$match[1]}
+  local -a lines=( ${(f)"$(_call_program mailq 'mailq')"} )
+
+  # $enable_long_queue_ids = no
+  compadd "$@" -- ${${(M)lines:#(#s)([0-9A-F]## )*}/(#s)(#b)([0-9A-F]##)*/$match[1]}
+
+  # $enable_long_queue_ids = yes
+  compadd "$@" -- ${${${(M)lines:#(#s)[0-9bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ](#c10)z*}%% *}%[*!]}
 }
 
 _postfix_main_cf_parameter() {