V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
linzhe141
V2EX  ›  Visual Studio Code

vscode 中的 zsh 多了个 "\",有人知道怎么取消这个吗?

  •  
  •   linzhe141 · 19 天前 · 591 次点击

    img

    多了个 \ 导致 zsh-autosuggestions 的提示会错位,就贼难用

    我输入的是npx eslint ./index.js,但是显示的是 npxx eslint ./index.j s

    img

    现在我只能每次执行完命令后,手动再输入一次zsh才行

    这个只会再 vscode 的终端才会出现,其他终端都是正常的

    2 条回复    2024-04-11 16:34:38 +08:00
    jswxg
        1
    jswxg  
       19 天前
    这是 zsh 自动转义功能,要关闭可以在 ~/.oh-my-zsh/lib/misc.zsh 里把下面对应的代码注释掉即可。

    if [[ $ZSH_VERSION != 5.1.1 ]]; then
    for d in $fpath; do
    if [[ -e "$d/url-quote-magic" ]]; then
    if is-at-least 5.1; then
    autoload -Uz bracketed-paste-magic
    zle -N bracketed-paste bracketed-paste-magic
    fi
    autoload -Uz url-quote-magic
    zle -N self-insert url-quote-magic
    break
    fi
    done
    fi
    linzhe141
        2
    linzhe141  
    OP
       19 天前
    我这个应该是 vscode 的 bug ,我拖动终端的宽度,就正常了
    @jswxg
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2336 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 03:54 · PVG 11:54 · LAX 20:54 · JFK 23:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.