Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _zcalc
- X-seq: zsh-workers 35033
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Subject: PATCH: _zcalc
- Date: Tue, 05 May 2015 11:50:45 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
Trivial but saves me remembering the options I assigned.
I've now annoyed myself by noting that '-#' isn't handled properly by
_arguments --- it doesn't notice it needs to quote the '#' as a
metacharacter, and doesn't understand the option letter if it is
quoted. Serves me right for using a metacharacter; I might make zcalc
understand -b, too. I won't be attempting to fix _arguments.
pws
diff --git a/Completion/Zsh/Function/_zcalc b/Completion/Zsh/Function/_zcalc
new file mode 100644
index 0000000..df554be
--- /dev/null
+++ b/Completion/Zsh/Function/_zcalc
@@ -0,0 +1,7 @@
+#compdef zcalc
+
+_arguments -s : \
+ '-#[Specify default base]:base: ' \
+ '-f[Force floating point for all expressions]' \
+ '-e[Treat command line as expressions to be output immediately]' \
+ '*:Expression: '
Messages sorted by:
Reverse Date,
Date,
Thread,
Author