Das*_*tor 6 ssh terminal copy-paste paste
我在 Mac 上运行终端并通过 ssh 连接到 Linux 主机。我在将文本复制和粘贴到我的终端时遇到了 2 个问题:
00~pastedtext01~. 我用谷歌搜索,发现这显然是由于“带括号的粘贴”。我能够通过printf '\e[?2004l'在发生时运行命令来解决这个问题。printf '\e[?2004l'和set enable-bracketed-paste off,问题依旧。当我退出并重新 ssh 到主机时,它甚至仍然存在,所以我知道这不是由于运行任何像 vim 这样的程序,因为即使在我通过 ssh 连接到主机后问题仍然会立即发生。有人可以帮忙吗???这正在扼杀我的生产力!以下是此问题的粘贴内容:
我知道,其他问题已经沿着这些线路问,像这样一个从堆栈兑换,但没有任何这些职位的答案都为我工作,所以我想我的问题可能比略有不同...
检查您的 ZSH 配置
cat ~/.zshrc
Run Code Online (Sandbox Code Playgroud)
检查是否plugins=(...)找到safe-paste. 如果存在,请编辑配置并删除safe-paste.
if grep -q "safe-paste" "~/.zshrc"; then # checks if str in contained in file
sed -e s/safe-paste//g -i ~/.zshrc # if so, it replaces the str with nothing
fi
Run Code Online (Sandbox Code Playgroud)
作为单行:
if grep -q "safe-paste" "~/.zshrc"; then; sed -e s/safe-paste//g -i ~/.zshrc; fi
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
697 次 |
| 最近记录: |