antigen: Cache/settings/bundle problem

Not sure if this is a bug or just me missing something, so decided to post it here. If this issue doesn’t suit the contributing guide - let me know and I’ll re-write/close it. Also, before we continue, it’s worth to mention that english aint my native, so I appologize for any misstakes and inconvinience in advance.

Antigen: 1.4.1 ZSH: 5.1.1

Steps are:

  1. Reset antigen with antigen reset command
  2. Open terminal
  3. Check autoseggestions (cmd + tab) - everything is fine autosuggestions
  4. Close terminal
  5. Open terminal
  6. Check autosuggestions (cmd + tab) - nothing shows up no_autosuggestions
  7. Reset antigen - everything is fine again

It applies not to all bundles/plugins. But wd is the most popular one for me.

My .zshrc (took this part from cookbook w/o detailed understanding):

export ANTIGEN_COMPDUMPFILE="${HOME}/.zcompdump"

# If there is antigen cache available
if [[ -f "${ADOT:-"${HOME}"/.antigen}/.cache/.zcache-payload" ]]; then
    # Load bundles statically
    source "${ADOT:-"${HOME}"/.antigen}/.cache/.zcache-payload"
    autoload -Uz compinit
    compinit -d "${ANTIGEN_COMPDUMPFILE}"
else
    source "${HOME}/.antigen.zsh"
    antigen init "${HOME}/.antigenrc"
fi

My .antigenrc:

antigen use oh-my-zsh
antigen bundles <<EOBUNDLES
    catimg
    chucknorris
    colorize
    command-not-found
    cp
    docker
    extract
    git
    git-extras
    gitfast
    history
    httpie
    per-directory-history
    soimort/translate-shell@develop
    taskwarrior
    thefuck
    web-search
    zsh-users/zsh-autosuggestions
    wd
    sudo
EOBUNDLES
antigen theme dein0s/dotfiles shells/zsh/themes/custom_agnoster
antigen apply

Both files and .antigen.zsh itself are symlinked into $HOME dir and points to appropriate files in my .dotfiles folder (antigen cloned as a submodule).

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 22 (12 by maintainers)

Most upvoted comments

Looks like this was some local issue with .zcompdump file. Redefined it in .zshrc and everything works fine now.

export _ANTIGEN_COMPDUMP="${ADOTDIR:-$HOME/.antigen}/.zcompdump"

Also, as I’ve mentioned in chat - that -C flag for compinit is worth thinking about. And we are done here 😃 Thanks for your support.

Feel free to close this issue if you don’t need any additional info from me.

Got that, I’ll stick to the latest develop then 😃 Atleast until the 2.0 release, if you don’t mind, as I don’t really like to lock submodules on any particular commit, as this functionality is just meh…

One more thing - antigen reset and antigen cache-gen are one-time-to-run commands, right?

Btw, as an update for the subj - that was definetly some cache problem here. Edited .zshrc to source init.zsh if it exists, autosuggestions works perfect for the last few hours.

A simple .zshrc as the following would do the job:

    source /path/to/antigen.zsh
    antigen init /path/to/.antigenrc

Do antigen reset and antigen cache-gen. A file init.zsh should be created at ${ADOTDIR:-$HOME/.antigen}. When you start your shell Antigen will use that file to load bundles and lazyload Antigen itself.

Hope that helps!

Edit: Sorry, misunderstood you, instructions are for develop rather than v1.4.1.

init.zsh is the path for cache from develop branch.

Yep, I’ve configured a submodule to watch for develop branch, as your master is still at 1.3.5. Should’ve mentioned this before, my bad.

Gonna play with cache file path then and fix submodule at 0bc49f9c9bfd9bbd78e29a2dc1c3f29f9b9a1227. I’ll report tomorrow.