Support version 5.10

Just taking the first three characters of $ZSH_VERSION would result in 5.10 becoming 5.1 and then failing this check. I've updated your logic to strip off the second dot and anything that follows it, thus ensuring all of these work: 5.10 5.10.1 5.10.1.2.3 5.100.
This commit is contained in:
Adam Katz 2024-07-18 17:52:54 -04:00 committed by GitHub
commit 0dfd528f6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@
# https://github.com/zsh-users/zsh/blob/f702e17b14d75aa21bff014168fa9048124db286/Functions/Zle/bracketed-paste-magic#L9-L12
# Load bracketed-paste-magic if zsh version is >= 5.1
if [[ ${ZSH_VERSION:0:3} -ge 5.1 ]]; then
if [[ ${ZSH_VERSION%.${ZSH_VERSION#*.*.}} -ge 5.1 ]]; then
set zle_bracketed_paste # Explicitly restore this zsh default
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic