diff options
author | Marc Cornellà <marc.cornella@live.com> | 2020-10-13 20:32:42 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2020-10-13 20:34:01 +0200 |
commit | 568a977d2076b4210a9a925c53abcf0a831e4003 (patch) | |
tree | e0b25e7145af91fa163f832b58b55814e1da843a /plugins/safe-paste/safe-paste.plugin.zsh | |
parent | a39bee8d11aca960651403dddbb7dba38b00183e (diff) | |
download | zsh-568a977d2076b4210a9a925c53abcf0a831e4003.tar.gz zsh-568a977d2076b4210a9a925c53abcf0a831e4003.tar.bz2 zsh-568a977d2076b4210a9a925c53abcf0a831e4003.zip |
safe-paste: fix _bracketed_paste_zle_init/finish error
Fixes #9337
Diffstat (limited to 'plugins/safe-paste/safe-paste.plugin.zsh')
-rw-r--r-- | plugins/safe-paste/safe-paste.plugin.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/safe-paste/safe-paste.plugin.zsh b/plugins/safe-paste/safe-paste.plugin.zsh index db524538c..d443ae8a2 100644 --- a/plugins/safe-paste/safe-paste.plugin.zsh +++ b/plugins/safe-paste/safe-paste.plugin.zsh @@ -84,7 +84,7 @@ _bracketed_paste_enqueue() { _bracketed_paste_zle_init() { _bracketed_paste_content='' # Tell terminal to send escape codes around pastes - if [ $TERM =~ '^(rxvt-unicode|xterm(-256color)?|screen(-256color)?)$' ]; then + if [[ $TERM =~ '^(rxvt-unicode|xterm(-256color)?|screen(-256color)?)$' ]]; then printf '\e[?2004h' fi } @@ -93,7 +93,7 @@ _bracketed_paste_zle_init() { _bracketed_paste_zle_finish() { # Turn off bracketed paste when we leave ZLE, so pasting in other programs # doesn't get the ^[[200~ codes around the pasted text - if [ $TERM =~ '^(rxvt-unicode|xterm(-256color)?|screen(-256color)?)$' ]; then + if [[ $TERM =~ '^(rxvt-unicode|xterm(-256color)?|screen(-256color)?)$' ]]; then printf '\e[?2004l' fi } |