antigen icon indicating copy to clipboard operation
antigen copied to clipboard

Antigen and oh-my-zsh error: No such file or directory: /plugins/osx/spotify

Open jakewies opened this issue 4 years ago • 13 comments

Description

When starting a new shell, I receive the following error:

/Users/$USER/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/osx/osx.plugin.zsh:source:329: no such file or directory: /plugins/osx/spotify

Note: I do no have oh-my-zsh installed with homebrew. I don't know if this is necessary or not.

Steps to reproduce

Minimal steps to reproduce this behavior. Example:

1 - install `zsh` through homebrew
2 - install `antigen` using `curl -L git.io/antigen > antigen.zsh`
3 - populate `.zshrc` with config below
4 - Open terminal

The error shows up before seeing a prompt.

Expected behavior:

- No error

Software version

  • antigen version: Antigen v2.2.2
  • zsh --version: zsh 5.7.1 (x86_64-apple-darwin18.2.0)
  • uname -a: Darwin Jakes-MacBook-Pro-2.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

Configuration

  • gist of .zshrc
# load Antigen
source $HOME/antigen.zsh

########## Antigen Plugins ##########

antigen bundle <<EOBUNDLES
    # Bundles from the default repo (robbyrussell's oh-my-zsh)
    git

    # Syntax highlighting bundle.
    zsh-users/zsh-syntax-highlighting

    # Fish-like auto suggestions
    zsh-users/zsh-autosuggestions

    # Extra zsh completions
    zsh-users/zsh-completions

    # Guess what to install when running an unknown command.
    command-not-found

    # Auto completion plugins
    git
    git-extras
    brew
    brew-cask
    lein
    osx
    node
    ssh-agent
    web-search

    # Other general oh-my-zsh plugins
    common-aliases
    extract
    z
    colored-man-pages

    # Pure Prompt
    mafredri/zsh-async
    sindresorhus/pure
EOBUNDLES

#####################################

# apply all changes
antigen apply

jakewies avatar Jul 23 '19 14:07 jakewies

if you are macOS, just rm -rf ~/.antigen then restart your terminal, it's worked for me

RazgrizHsu avatar Nov 27 '19 13:11 RazgrizHsu

same issue here

tshu-w avatar Jun 03 '20 10:06 tshu-w

if you are macOS, just rm -rf ~/.antigen then restart your terminal, it's worked for me

That did nothing

Daniel4-Scratch avatar Jun 07 '20 06:06 Daniel4-Scratch

Having a similar issue. I see

.antigen/bundles/robbyrussell/oh-my-zsh/plugins/gh/gh.plugin.zsh:14: no such file or directory: .antigen/bundles/robbyrussell/oh-my-zsh/cache//completions/_gh

echoing $ZSH_CACHE_DIR results in this string .antigen/bundles/robbyrussell/oh-my-zsh/cache/

I'm wondering if the trailing slash is causing a problem?

On MacOS 12.5.1 intel

BitForger avatar Aug 22 '22 14:08 BitForger

@BitForger I meet this problem too. I use Linux.

Normally, oh-my-zsh should have created completions folder, so plugin self doesn't need to check or create it. But here, something is wrong. So I have to create this folder manually.

The extra slash is not problem.

zyf0330 avatar Nov 30 '22 09:11 zyf0330

I noticed that the release notes for plugins https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins now state that osx was renamed to macos. after updating osx to be macos I no longer have this message.

bobthearsonist avatar Dec 19 '22 16:12 bobthearsonist

Having a similar issue. I see

.antigen/bundles/robbyrussell/oh-my-zsh/plugins/gh/gh.plugin.zsh:14: no such file or directory: .antigen/bundles/robbyrussell/oh-my-zsh/cache//completions/_gh

echoing $ZSH_CACHE_DIR results in this string .antigen/bundles/robbyrussell/oh-my-zsh/cache/

I'm wondering if the trailing slash is causing a problem?

On MacOS 12.5.1 intel

I got the same issue as well for gh on my Mac.

batbrain9392 avatar Jan 11 '23 10:01 batbrain9392

@BitForger @zyf0330 I can confirm that the extra slash is not problem.

The issue goes away if I manually create the completions folder inside ~/.antigen/bundles/robbyrussell/oh-my-zsh/cache, because that was non-existent. I wonder if it could be autogenerated in antigen.

batbrain9392 avatar Jan 11 '23 10:01 batbrain9392

The cache folder should have be generated.

Debmallya Bhattacharya @.***> 于2023年1月11日周三 18:32写道:

@BitForger https://github.com/BitForger @zyf0330 https://github.com/zyf0330 I can confirm that the extra slash is not problem.

The issue goes away if I manually create the completions folder inside ~/.antigen/bundles/robbyrussell/oh-my-zsh/cache, because that was non-existent. I wonder if it could be autogenerated in antigen.

— Reply to this email directly, view it on GitHub https://github.com/zsh-users/antigen/issues/688#issuecomment-1378541669, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3HTAOWIQGCPRLKGSLHMD3WR2D2BANCNFSM4IGFDA5A . You are receiving this because you were mentioned.Message ID: @.***>

zyf0330 avatar Jan 11 '23 10:01 zyf0330

Nevermind, my solution didn't work ultimately. Seems like using antigen bundle gh isn't working for me. Issue due to my solution if u use gh:

(eval):1: _gh: function definition file not found

batbrain9392 avatar Jan 11 '23 10:01 batbrain9392

I used gh completion -s=zsh > ~/.antigen/bundles/zsh-users/zsh-completions/src/_gh, instead of the gh plugin. Works with antigen.

batbrain9392 avatar Jan 11 '23 11:01 batbrain9392

Still an issue. MacOS Sonoma (14.0) + the latest antigen. Creating completions directory solves the issue for docker plugin.

askolesov avatar Oct 08 '23 06:10 askolesov

The same happens for the Rust plugin.

The completions directory as well as adding it to fpath should be done on startup by oh-my-zsh (https://github.com/ohmyzsh/ohmyzsh/blob/e11d81303753b0fefbc50ce10ec4612c7ff33e84/oh-my-zsh.sh#L65-L66). My guess is that antigen just does not source that script.

I could even work out a PR, but this repo is where PRs go to die, apparently (see #725).

I've put up with this plugin manager for far too many years...

acidghost avatar Nov 24 '23 09:11 acidghost