1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-21 00:01:26 +01:00
zsh/Functions/Zle/read-from-minibuffer

21 lines
390 B
Text
Raw Normal View History

local savelbuffer=$LBUFFER saverbuffer=$RBUFFER
local savepredisplay=$PREDISPLAY savepostdisplay=$POSTDISPLAY
LBUFFER=
RBUFFER=
PREDISPLAY="$PREDISPLAY$savelbuffer$saverbuffer$POSTDISPLAY
${1:-? }"
POSTDISPLAY=
zle recursive-edit
integer stat=$?
(( stat )) || REPLY=$BUFFER
LBUFFER=$savelbuffer
RBUFFER=$saverbuffer
PREDISPLAY=$savepredisplay
POSTDISPLAY=$savepostdisplay
return $stat