diff --git a/vcsh b/vcsh
index 5acd515dc422ab8b0dc0ef2d42611dc7db2f67c2..e3612b72520aeaac75bbd8e5073f3b6546f53415 100755
--- a/vcsh
+++ b/vcsh
@@ -93,7 +93,12 @@ elif [ "$1" = 'use' ]; then
if [[ -o NO_IGNORE_EOF ]]; then
export VCSH_NO_IGNORE_EOF=1
setopt IGNORE_EOF
- vcsh_exit() {vcsh exit; zle reset-prompt;}
+ if [[ -n $ZSH_VERSION ]]; then
+ vcsh_exit() {
+ vcsh exit;
+ zle reset-prompt;
+ }
+ fi
zle -N vcsh_exit
bindkey '^d' 'vcsh_exit'
fi