summaryrefslogtreecommitdiff
path: root/Functions/Zle/edit-command-line
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2018-04-07 15:12:57 +0200
committerAxel Beckert <abe@deuxchevaux.org>2018-04-07 15:12:57 +0200
commit6e1ab9aa550695ee7e3d467b4173c0b83ba7f759 (patch)
tree8fb7faa4364a7cbf1cba48296a5f537e13f2a8d9 /Functions/Zle/edit-command-line
parent5ad56a41f1ee2e61abca079f5ea8909f895ac2dd (diff)
parentf027f1d6e876708bc75d4217e1ca26898658d8d3 (diff)
downloadzsh-6e1ab9aa550695ee7e3d467b4173c0b83ba7f759.tar.gz
zsh-6e1ab9aa550695ee7e3d467b4173c0b83ba7f759.zip
Merge tag 'zsh-5.4.2-test-2' / 'upstream' branch into 'debian' branch
Test version 2 prior to zsh 5.5.
Diffstat (limited to 'Functions/Zle/edit-command-line')
-rw-r--r--Functions/Zle/edit-command-line10
1 files changed, 5 insertions, 5 deletions
diff --git a/Functions/Zle/edit-command-line b/Functions/Zle/edit-command-line
index 353f2609a..e17893e93 100644
--- a/Functions/Zle/edit-command-line
+++ b/Functions/Zle/edit-command-line
@@ -15,15 +15,15 @@
(( $+zle_bracketed_paste )) && print -r -n - $zle_bracketed_paste[2]
# Open the editor, placing the cursor at the right place if we know how.
- local editor=${${VISUAL:-${EDITOR:-vi}}}
+ local editor=( "${(@Q)${(z)${VISUAL:-${EDITOR:-vi}}}}" )
case $editor in
(*vim*)
integer byteoffset=$(( $#PREBUFFER + $#LBUFFER + 1 ))
- ${=editor} -c "normal! ${byteoffset}go" -- $1;;
+ "${(@)editor}" -c "normal! ${byteoffset}go" -- $1;;
(*emacs*)
- local lines=( ${(f):-"$PREBUFFER$LBUFFER"} )
- ${=editor} +${#lines}:$((${#lines[-1]} + 1)) $1;;
- (*) ${=editor} $1;;
+ local lines=( "${(@f):-"$PREBUFFER$LBUFFER"}" )
+ "${(@)editor}" +${#lines}:$((${#lines[-1]} + 1)) $1;;
+ (*) "${(@)editor}" $1;;
esac
(( $+zle_bracketed_paste )) && print -r -n - $zle_bracketed_paste[1]