diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2014-08-11 17:39:42 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2014-08-11 17:39:42 +0200 |
commit | 382c26acfc62a56744ab9eb603efc56130764fd3 (patch) | |
tree | 1b7cb9d3e372481007fc4546e7d06ce5bb1bc104 /Functions/Misc/zcalc | |
parent | 73508e345b4925f33b7f652aba9bd313169e5ac2 (diff) | |
parent | f8ae47f29b766dc0330b19d7fdb35859d6aab930 (diff) | |
download | zsh-382c26acfc62a56744ab9eb603efc56130764fd3.tar.gz zsh-382c26acfc62a56744ab9eb603efc56130764fd3.zip |
New upstream release candidate: Merge branch 'upstream' into debian
Diffstat (limited to 'Functions/Misc/zcalc')
-rw-r--r-- | Functions/Misc/zcalc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Functions/Misc/zcalc b/Functions/Misc/zcalc index 1f3392d92..63f67adb0 100644 --- a/Functions/Misc/zcalc +++ b/Functions/Misc/zcalc @@ -96,6 +96,9 @@ emulate -L zsh setopt extendedglob +# For testing in ZLE functions. +local ZCALC_ACTIVE=1 + # TODO: make local variables that shouldn't be visible in expressions # begin with _. local line ans base defbase forms match mbegin mend psvar optlist opt arg @@ -196,8 +199,8 @@ while (( expression_mode )) || # special cases # 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 [[ $line = (#b)[[:blank:]]#('[#'(\#|)((<->|)(|_|_<->))']')[[:blank:]]#(*) ]]; then + if [[ -z $match[6] ]]; then if [[ -z $match[3] ]]; then defbase= else |