Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: zcalc default base
- X-seq: zsh-workers 32453
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Subject: PATCH: zcalc default base
- Date: Sat, 1 Mar 2014 21:03:27 +0000
- 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
I messed up zcalc's ability to set a default base when I modified it for
the [#_] syntax. I think this is the right fix.
diff --git a/Functions/Misc/zcalc b/Functions/Misc/zcalc
index 6a56d47..b796446 100644
--- a/Functions/Misc/zcalc
+++ b/Functions/Misc/zcalc
@@ -197,7 +197,7 @@ while (( expression_mode )) ||
# Set default base if `[#16]' or `[##16]' etc. on its own.
# Unset it if `[#]' or `[##]'.
if [[ $line = (#b)[[:blank:]]#('[#'(\#|)((<->|)(|_|_<->))']')[[:blank:]]#(*) ]]; then
- if [[ -z $match[4] ]]; then
+ if [[ -z $match[6] ]]; then
if [[ -z $match[3] ]]; then
defbase=
else
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author