如果在 iTerm2 中复制命令特别卡,就跟慢动作似的。你可以编辑 ~/.zshrc
:
vim ~/.zshrc
增加如下内容:
pasteinit() {OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}pastefinish() {zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
然后执行:
source ~/.zshrc