setopt prompt_subst
-# precmd() => a function which is executed just before each prompt
-# use 'NOPRECMD=1' to disable the precmd + preexec commands
-
-# precmd () { setopt promptsubst; [[ -o interactive ]] && jobs -l;
-
# make sure to use right prompt only when not running a command
is41 && setopt transient_rprompt
# allow manual overwriting of RPROMPT
if [[ -n $RPROMPT ]] ; then
- [[ $TERM == screen* ]] && echo -n $'\ekzsh\e\\'
+ [[ $TERM == screen* ]] && print -nP "\ekzsh\e\\"
# return 0
fi
# just use DONTSETRPROMPT=1 to be able to overwrite RPROMPT
esac
}
-# chpwd () => a function which is executed whenever the directory is changed
-
# preexec() => a function running before every command
is4 && [[ -z $NOPRECMD ]] && \
preexec () {
}
EXITCODE="%(?..%?%1v )"
-PS2='`%_> ' # secondary prompt, printed when the shell needs more information to complete a command.
+PS2='\`%_> ' # secondary prompt, printed when the shell needs more information to complete a command.
PS3='?# ' # selection prompt used within a select loop.
PS4='+%N:%i:%_> ' # the execution trace prompt (setopt xtrace). default: '+%N:%i>'