zsh-users / antigen

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

antigen bundle does not print errors when plugin not found #631

Closed dead10ck closed 6 years ago

dead10ck commented 6 years ago

If the user gives antigen bundle a plugin that does not exist, it fails to reliably print any error messages. From an interactive shell, it only complains sometimes:

➜  ~ antigen bundle lskjdflksdjf
Seems robbyrussell/oh-my-zsh is already installed!
➜  ~ antigen bundle ksjdoflksjdf
Antigen: Failed to load plugin.

When the same bundle command is used in a .zshrc, it never prints an error.

desyncr commented 6 years ago

@dead10ck Thanks for reporting. I'll look into it tonight!

desyncr commented 6 years ago

Can you share your .zshrc and .antigenrc to reproduce this report?

dead10ck commented 6 years ago

Sorry for the delay. Sure, here's my .zshrc:

# install with antigen-git
antigen=/usr/share/zsh/share/antigen.zsh

if [[ -f $antigen ]]; then
  source $antigen

  # Load the oh-my-zsh's library.
  antigen use oh-my-zsh

  # Bundles from the default repo (robbyrussell's oh-my-zsh).
  antigen bundles <<EOBUNDLES
    pip
    seebi/dircolors-solarized
    zsh-users/zsh-autosuggestions

    # these two have to be in this order
    zsh-users/zsh-syntax-highlighting
    zsh-users/zsh-history-substring-search
EOBUNDLES

  # Load the theme.
  antigen theme robbyrussell

  # Tell Antigen that you're done.
  antigen apply
else
  print "$antigen missing!"
fi

# key bindings
bindkey -v
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
bindkey -v '^?' backward-delete-char
bindkey '\eOH'  beginning-of-line
bindkey '\eOF'  end-of-line
bindkey '^F'  end-of-line
bindkey '^[[3~' delete-char

# aliases
alias tiga='tig --all'
alias tigs='tig --status'
alias dc='docker-compose'
alias ap='ansible-playbook'
alias lss='ls -alh'
alias e='exa'
alias el='exa -alb'
alias gvim='gvim -geom 150x45'

alias ga='git add'
alias gbi='git bisect'
alias gs='git status'
alias gd='git diff'
alias gdc='git diffc'
alias gdlc='git difflc'
alias gl='git lg'
alias gll='git llg'
alias gla='git lga'
alias glla='git llga'

alias dr='sudo systemctl daemon-reload'
alias start='sudo systemctl start'
alias restart='sudo systemctl restart'
alias stop='sudo systemctl stop'
alias enable='sudo systemctl enable'
alias disable='sudo systemctl disable'
# fish has a built-in called status, so we can't alias it
# alias status='sudo systemctl status'

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
alias gradle='gradle --console rich'
alias t='theca'
alias v='vagrant'

update() {
  pacaur -Syu --devel --needed $@

  if [ $? -ne 0 ]; then
    echo "Pacman update failed. Exiting."
    return -1
  fi

  antigen update

  # can't do this while it's installed from the AUR
  # antigen selfupdate
}

# vim: set ts=2 sw=2 et:

I have no .antigenrc.

desyncr commented 6 years ago

Thanks you. I'll take a look!

desyncr commented 6 years ago

It's curious but I can't seem to reproduce this from v1.4.0 forward. Which version are you using Debian's/Ubuntu's version?

desyncr commented 6 years ago

I'm closing this as I can't seem to reproduce it.