mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-09 21:07:12 +00:00
fix: Paste not working in zsh shell integration
This commit is contained in:
parent
0f6b29ba81
commit
44c082757c
@ -1,7 +1,23 @@
|
|||||||
|
_disable_bracketed_paste() {
|
||||||
|
# Check if bracketed paste is defined, for compatibility with older versions
|
||||||
|
if [[ -n $zle_bracketed_paste ]]; then
|
||||||
|
print -nr ${zle_bracketed_paste[2]} >/dev/tty
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_enable_bracketed_paste() {
|
||||||
|
# Check if bracketed paste is defined, for compatibility with older versions
|
||||||
|
if [[ -n $zle_bracketed_paste ]]; then
|
||||||
|
print -nr ${zle_bracketed_paste[1]} >/dev/tty
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
_tv_smart_autocomplete() {
|
_tv_smart_autocomplete() {
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
zle -I
|
zle -I
|
||||||
|
|
||||||
|
_disable_bracketed_paste
|
||||||
|
|
||||||
# prefix (lhs of cursor)
|
# prefix (lhs of cursor)
|
||||||
local current_prompt
|
local current_prompt
|
||||||
current_prompt=$LBUFFER
|
current_prompt=$LBUFFER
|
||||||
@ -24,12 +40,16 @@ _tv_smart_autocomplete() {
|
|||||||
# (i.e. run the command without having to press enter twice)
|
# (i.e. run the command without having to press enter twice)
|
||||||
# zle accept-line
|
# zle accept-line
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
_enable_bracketed_paste
|
||||||
}
|
}
|
||||||
|
|
||||||
_tv_shell_history() {
|
_tv_shell_history() {
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
zle -I
|
zle -I
|
||||||
|
|
||||||
|
_disable_bracketed_paste
|
||||||
|
|
||||||
local current_prompt
|
local current_prompt
|
||||||
current_prompt=$LBUFFER
|
current_prompt=$LBUFFER
|
||||||
|
|
||||||
@ -46,6 +66,8 @@ _tv_shell_history() {
|
|||||||
# (i.e. run the command without having to press enter twice)
|
# (i.e. run the command without having to press enter twice)
|
||||||
# zle accept-line
|
# zle accept-line
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
_enable_bracketed_paste
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user