about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-08-27 18:44:48 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-08-30 01:57:55 +0000
commit823bb6fe8572f176f4433b12677ea90e06ca9d53 (patch)
treee151d44031b91f42b17499b1a0aa183e878a38af
parent1712c626339c3e7f40273d9e57906fab96a329a9 (diff)
downloadzsh-823bb6fe8572f176f4433b12677ea90e06ca9d53.tar.gz
zsh-823bb6fe8572f176f4433b12677ea90e06ca9d53.tar.xz
zsh-823bb6fe8572f176f4433b12677ea90e06ca9d53.zip
39107: _postfix: Complete 'postqueue'. Also minor tweaks to 'postsuper'.
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_postfix18
2 files changed, 17 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d33d9b2c0..27e56d6fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-08-30  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 39107: Completion/Unix/Command/_postfix: Complete
+	'postqueue'. Also minor tweaks to 'postsuper'.
+
 	* 39109: Completion/Unix/Command/_postfix: Use mailq to obtain
 	queue id's.
 
diff --git a/Completion/Unix/Command/_postfix b/Completion/Unix/Command/_postfix
index 68115694f..2e6a0a04d 100644
--- a/Completion/Unix/Command/_postfix
+++ b/Completion/Unix/Command/_postfix
@@ -1,4 +1,4 @@
-#compdef postsuper
+#compdef postqueue postsuper
 
 _postfix_queue_id() {
   compadd "$@" -- ${${(M)${(f)"$(_call_program mailq 'mailq')"}:#(#s)([0-9A-F]##)*}/(#s)(#b)([0-9A-F]##)*/$match[1]}
@@ -6,15 +6,25 @@ _postfix_queue_id() {
 
 case $service in
 	(postsuper)
-	_arguments -C \
+	_arguments -C -s : \
 	'-p[purge old tempfiles]' \
 	'-s[structure check and repair]' \
-	'-v[verbose]' \
+	'*-v[verbose]' \
 	'-c[configdir]:config dir:_files -/' \
 	'-d[delete]:queue id:_postfix_queue_id' \
 	'-h[hold]:queue id:_postfix_queue_id' \
 	'-H[release]:queue id:_postfix_queue_id' \
-	'-r[requeue]:queue id:_postfix_queue_id' \
+	'*-r[requeue]:queue id, or "ALL":_postfix_queue_id' \
 	'1:queue:(hold incoming active deferred)'
 	;;
+        (postqueue)
+        _arguments -C -s : \
+          '*-v[enable verbose logging]' \
+          '-c[configdir]:config dir:_files -/' \
+          '(-f -i -j -p -s)-f[flush the queue]' \
+          '(-f -i -j -p -s)-i[immediately deliver one message]:queue id:_postfix_queue_id' \
+          '(-f -i -j -p -s)-j[print the queue in json]' \
+          '(-f -i -j -p -s)-p[print the queue in traditional format]' \
+          '(-f -i -j -p -s)-s[immediately deliver messages to specified site]:site:_hosts' 
+        ;;
 esac