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

ZSH 安装插件就是找不到路径,无法生效

  •  
  •   owlzhang95 · 231 天前 · 657 次点击
    这是一个创建于 231 天前的主题,其中的信息可能已经有所发展或是发生改变。

    使用 Brew 安装了 zsh-autosuggestions 、zsh-syntax-highlighting 两个插件,执行完 source 提示

    [oh-my-zsh] plugin 'zsh-autosuggestions' not found

    [oh-my-zsh] plugin 'zsh-syntax-highlighting' not found

    查询 ZSH WIKI 得知插件要安装到 zsh/custom/plugins 路径下,于是将 brew 路径下的插件挪到了该路径下,在 zshrc 文件中添加了

    source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

    source ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

    plugins=(brew git zsh-autosuggestions zsh-syntax-highlighting)

    再次 source ,除了 not found ,还提示

    no such file or directory: /Users/xx/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

    no such file or directory: /Users/xx/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

    路径下有,还找不到就很奇怪,大佬们救救

    2 条回复    2023-10-13 00:46:41 +08:00
    AsuorZ
        1
    AsuorZ  
       224 天前 via Android
    用 zap
    ABUbaff
        2
    ABUbaff  
       202 天前 via Android
    @AsuorZ 有个笨办法,直接在 GitHub 下载这两个包,注意文件夹改名,把文件夹放在 custom/plugin 中,在./zshrc 中只需要添加 plugin=(两个包名)就可以了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1320 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 17:07 · PVG 01:07 · LAX 10:07 · JFK 13:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.