Fix edit-command-line-split
This commit is contained in:
parent
85ec31479e
commit
b5deb6e21f
3 changed files with 21 additions and 19 deletions
|
@ -1,16 +1,16 @@
|
|||
edit-command-line-tmux() {
|
||||
local tmpfile=${TMPPREFIX:-/tmp/zsh}ecl$$
|
||||
local tmpfile=${TMPPREFIX:-/tmp/zsh}ecl$$
|
||||
|
||||
print -R - "$PREBUFFER$BUFFER" >$tmpfile
|
||||
exec </dev/tty
|
||||
if [[ $KITTY_WINDOW_ID ]]; then
|
||||
kitty @launch --type overlay vim -c 'set laststatus=0 showtabline=0 ft=zsh' $tmpfile
|
||||
tail -f --pid=$(pgrep -f "vim.*${tmpfile:t}") /dev/null
|
||||
else
|
||||
${=${VISUAL:-${EDITOR:-vi}}} $tmpfile
|
||||
fi
|
||||
print -Rz - "$(<$tmpfile)"
|
||||
print -R - "$PREBUFFER$BUFFER" >$tmpfile
|
||||
exec </dev/tty
|
||||
if [[ $KITTY_WINDOW_ID ]]; then
|
||||
kitty @launch --type overlay vim -c 'set laststatus=0 showtabline=0 ft=zsh' $tmpfile
|
||||
tail -f --pid=$(pgrep -f "vim.*${tmpfile}") /dev/null &> /dev/null
|
||||
else
|
||||
${=${VISUAL:-${EDITOR:-vi}}} $tmpfile
|
||||
fi
|
||||
print -Rz - "$(<$tmpfile)"
|
||||
|
||||
command rm -f $tmpfile
|
||||
zle send-break # Force reload from the buffer stack
|
||||
}
|
||||
command rm -f $tmpfile
|
||||
zle send-break # Force reload from the buffer stack
|
||||
|
||||
# vim:ft=zsh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue