diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2001-10-08 15:18:25 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2001-10-08 15:18:25 +0000 |
| commit | 6fa692b6e4eaaedb5209ca83da6735f85f3f7e62 (patch) | |
| tree | 190446b16f4fbf4b4d326e28ead932bfa4a6c8ab | |
| parent | Insert missing single quote. (diff) | |
| download | zsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.tar zsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.tar.gz zsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.tar.bz2 zsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.tar.lz zsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.tar.xz zsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.tar.zst zsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.zip | |
zcalc base display fix
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | Functions/Misc/zcalc | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,7 @@ 2001-10-08 Peter Stephenson <pws@csr.com> + * 15980: Functions/Misc/zcalc: '[#16] 2000' ignored the base. + * unposted: LICENCE: wording change from ages ago. 2001-10-08 Oliver Kiddle <opk@zsh.org> diff --git a/Functions/Misc/zcalc b/Functions/Misc/zcalc index d9d1fb91b..78a48b9b0 100644 --- a/Functions/Misc/zcalc +++ b/Functions/Misc/zcalc @@ -141,7 +141,11 @@ while vared -cehp "${(%)ZCALCPROMPT}" line; do eval "latest=\$(( $line ))" argv[num++]=$latest psvar[1]=$num - print -- $(( $base $latest )) + if [[ -z $base ]]; then + print -- $latest + else + print -- $(( $base $latest )) + fi fi line= done |
