1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00
zsh/Functions/Zle/zcalc-auto-insert
2014-04-07 09:58:30 +01:00

8 lines
217 B
Text

# Bind to a binary operator keystroke for use with zcalc
if [[ -n $ZCALC_ACTIVE ]]; then
if [[ $CURSOR -eq 0 || $LBUFFER[-1] = "(" ]]; then
LBUFFER+=${ZCALC_AUTO_INSERT_PREFIX:-"ans "}
fi
fi
zle .self-insert