Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _postfix (simple and incomplete)
- X-seq: zsh-workers 20634
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: _postfix (simple and incomplete)
- Date: Fri, 24 Dec 2004 14:48:22 -0500
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
This is just so I can get completions for "postsuper -d".
Even that could use improvement.
Index: Completion/Unix/Command/_postfix
===================================================================
RCS file: Completion/Unix/Command/_postfix
diff -N Completion/Unix/Command/_postfix
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_postfix 24 Dec 2004 19:46:52 -0000
@@ -0,0 +1,20 @@
+#compdef postsuper
+
+_postfix_queue_id() {
+compadd ${${(M)${(f)"$(postqueue -p)"}:#(#s)([0-9A-F]##)*}/(#s)(#b)([0-9A-F]##)*/$match[1]}
+}
+
+case $service in
+ (postsuper)
+ _arguments -C \
+ '-p[purge old tempfiles]' \
+ '-s[structure check and repair]' \
+ '-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' \
+ '1:queue:(hold incoming active deferred)'
+ ;;
+esac
Messages sorted by:
Reverse Date,
Date,
Thread,
Author