diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2003-02-03 11:05:53 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2003-02-03 11:05:53 +0000 |
commit | 06902e7f66be368975ca4c58607191cf36a68781 (patch) | |
tree | 92287c5ffd8957c4568073cc8cfcb739012d5dae /Functions/Zle/read-from-minibuffer | |
parent | 980b437fcac06d47b37d36e7bbde0150f7d19ad2 (diff) | |
download | zsh-06902e7f66be368975ca4c58607191cf36a68781.tar.gz zsh-06902e7f66be368975ca4c58607191cf36a68781.tar.xz zsh-06902e7f66be368975ca4c58607191cf36a68781.zip |
18174: New read-from-minibuffer and replace-string ZLE functions
Diffstat (limited to 'Functions/Zle/read-from-minibuffer')
-rw-r--r-- | Functions/Zle/read-from-minibuffer | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Functions/Zle/read-from-minibuffer b/Functions/Zle/read-from-minibuffer new file mode 100644 index 000000000..93eec42a5 --- /dev/null +++ b/Functions/Zle/read-from-minibuffer @@ -0,0 +1,20 @@ +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 |