summary refs log tree commit diff
path: root/Functions/Misc
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2001-10-08 15:18:25 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2001-10-08 15:18:25 +0000
commit6fa692b6e4eaaedb5209ca83da6735f85f3f7e62 (patch)
tree190446b16f4fbf4b4d326e28ead932bfa4a6c8ab /Functions/Misc
parentb63f2f824a93c5989c9c128134c0d83653c31528 (diff)
downloadzsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.tar.gz
zsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.tar.xz
zsh-6fa692b6e4eaaedb5209ca83da6735f85f3f7e62.zip
zcalc base display fix
Diffstat (limited to 'Functions/Misc')
-rw-r--r--Functions/Misc/zcalc6
1 files changed, 5 insertions, 1 deletions
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