summaryrefslogtreecommitdiff
path: root/Functions/Zle/edit-command-line
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:32:59 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:58:59 +0200
commitdb38e167634b6c2217eec3a5aafc37c46d9e5a8d (patch)
treedaa342d423febbd3a5a7ef97053037677fab004a /Functions/Zle/edit-command-line
parent01eea47617a6e06debdb4330f92ae69f92089fd2 (diff)
parent3c3c8d3d13fd4cf6c03f81ca8dc18a1efd561728 (diff)
downloadzsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.tar.gz
zsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Functions/Zle/edit-command-line')
-rw-r--r--Functions/Zle/edit-command-line12
1 files changed, 5 insertions, 7 deletions
diff --git a/Functions/Zle/edit-command-line b/Functions/Zle/edit-command-line
index 250cac65f..100af9601 100644
--- a/Functions/Zle/edit-command-line
+++ b/Functions/Zle/edit-command-line
@@ -6,12 +6,10 @@
# will give ksh-like behaviour for that key,
# except that it will handle multi-line buffers properly.
-local tmpfile=${TMPPREFIX:-/tmp/zsh}ecl$$
+() {
+ exec </dev/tty
+ ${=${VISUAL:-${EDITOR:-vi}}} $1
+ print -Rz - "$(<$1)"
+} =(<<<"$PREBUFFER$BUFFER")
-print -R - "$PREBUFFER$BUFFER" >$tmpfile
-exec </dev/tty
-${=${VISUAL:-${EDITOR:-vi}}} $tmpfile
-print -Rz - "$(<$tmpfile)"
-
-command rm -f $tmpfile
zle send-break # Force reload from the buffer stack