Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jakewies opened this issue Jul 23, 2019 · 13 comments

Comments

@jakewies
Copy link

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
@RazgrizHsu
Copy link

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

@tshu-w
Copy link

tshu-w commented Jun 3, 2020

same issue here

@Daniel4-Scratch
Copy link

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

That did nothing

@BitForger
Copy link

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
Copy link

zyf0330 commented Nov 30, 2022

@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
Copy link

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
Copy link

batbrain9392 commented Jan 11, 2023

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
Copy link

@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
Copy link

zyf0330 commented Jan 11, 2023 via email

@batbrain9392
Copy link

batbrain9392 commented Jan 11, 2023

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
Copy link

batbrain9392 commented Jan 11, 2023

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

@askolesov
Copy link

askolesov commented Oct 8, 2023

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

@acidghost
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants