zsh-users / antigen

The plugin manager for zsh.
http://antigen.sharats.me
MIT License
8.07k stars 279 forks source link

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

Open jakewies opened 5 years ago

jakewies commented 5 years ago

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

Configuration


# 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
RazgrizHsu commented 4 years ago

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

tshu-w commented 4 years ago

same issue here

Daniel4-Scratch commented 4 years ago

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

That did nothing

BitForger commented 2 years ago

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

zyf0330 commented 1 year ago

@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.

bobthearsonist commented 1 year ago

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.

batbrain9392 commented 1 year ago

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 commented 1 year ago

@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.

zyf0330 commented 1 year ago

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: @.***>

batbrain9392 commented 1 year ago

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 commented 1 year ago

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

askolesov commented 1 year ago

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

acidghost commented 11 months ago

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...