7303385b1fc7030bef90589c32120f90eb57c3e1

Author
Adam Katz <6454774+adamhotep@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

fix(safe-paste): properly test Zsh version number (#12565)


Diff

 1diff --git a/plugins/safe-paste/safe-paste.plugin.zsh b/plugins/safe-paste/safe-paste.plugin.zsh
 2index d443ae8a29b8736b80754903962872a668e17e78..c7079059b187a135835da0efc930088357bf0e9d 100644
 3--- a/plugins/safe-paste/safe-paste.plugin.zsh
 4+++ b/plugins/safe-paste/safe-paste.plugin.zsh
 5@@ -9,7 +9,8 @@
 6 # https://github.com/zsh-users/zsh/blob/f702e17b14d75aa21bff014168fa9048124db286/Functions/Zle/bracketed-paste-magic#L9-L12
 7 
 8 # Load bracketed-paste-magic if zsh version is >= 5.1
 9-if [[ ${ZSH_VERSION:0:3} -ge 5.1 ]]; then
10+autoload -Uz is-at-least
11+if is-at-least 5.1; then
12   set zle_bracketed_paste  # Explicitly restore this zsh default
13   autoload -Uz bracketed-paste-magic
14   zle -N bracketed-paste bracketed-paste-magic