Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _zcalc



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