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

Disabling cache causes issue with git plugin #676

Open
markleary opened this issue Sep 13, 2018 · 2 comments
Open

Disabling cache causes issue with git plugin #676

markleary opened this issue Sep 13, 2018 · 2 comments

Comments

@markleary
Copy link

Description

I want to configure antigen to use two different themes on same computers depending on the value of TERM_PROGRAM. Use case is I want a more basic theme for a terminal window embedded in my editor. With the default config, setting antigen theme based on TERM_PROGRAM does not quite work. The second terminal opened will always use the theme of the first terminal opened. If I disable the cache with ANTIGEN_CACHE=false, theme switching works but it breaks the git plugin.

Steps to reproduce

Minimal steps to reproduce this behavior. Example:

Create a simple antigen .zshrc file:

ANTIGEN_CACHE=false
source ~/.antigen.zsh
antigen use oh-my-zsh
antigen bundle git
antigen apply

When running the shell, the following is displayed

compdef: unknown command or service: git-diff
compdef: unknown command or service: git-checkout
compdef: unknown command or service: git-checkout
compdef: unknown command or service: git-checkout
compdef: unknown command or service: git-checkout
compdef: unknown command or service: git-checkout
compdef: unknown command or service: git-checkout
compdef: unknown command or service: git-checkout
compdef: unknown command or service: git-checkout
compdef: unknown command or service: git-log
compdef: unknown command or service: git-push

Software version

  • Antigen develop (d1dd78b) (same behavior with release)
  • zsh 5.3 (x86_64-apple-darwin17.0)
  • Darwin Kernel Version 17.7.0 x86_64

More information

If you remove the antigen bundle git from .zshrc and manually load the bundle after the shell loads, it works as expected.

@stafyniaksacha
Copy link

Got same issue with:

  • antigen v2.2.2
  • debian stretch 4.9.0-7-amd64
  • zsh 5.3.1 (x86_64-debian-linux-gnu)

@seansfkelley
Copy link

seansfkelley commented Mar 6, 2019

I'm seeing something similar, though without twiddling the theme-switching or caching. compdefs for git before antigen apply were failing, but after antigen apply were not. I tried moving antigen apply up to right after the source:

source /path/to/antigen.zsh
antigen apply
antigen use oh-my-zsh
antigen bundle git

and now it works? The antigen apply docs suggest this is either a bad idea (for performance reasons) or shouldn't work, but in any case, all my plugins and completions seem to be working fine. YMMV?

  • antigen v2.2.2
  • zsh 5.7.1
  • macOS 10.14

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

3 participants