Open mssngr opened 6 years ago
I feel like I'm experiencing something similar when re-sourcing ~/.zshrc.
Upon opening a new terminal, the first load is fine. But if I run source ~/.zshrc
I get the following output, and then it hangs indefinitely.
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems zsh-users/zsh-syntax-highlighting is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
My .zshrc file looked like this:
#!/bin/zsh
source ~/.config/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
antigen bundle heroku
antigen bundle pip
antigen bundle lein
antigen bundle command-not-found
antigen bundle zsh-users/zsh-syntax-highlighting
antigen theme clean
antigen apply
export PATH=/usr/local/bin:/usr/local/sbin:${PATH}
export PATH=$PATH:~/.cargo/bin
export PATH=$PATH:~/bin
export RBENV_ROOT=/usr/local/var/rbenv
Update removing the antigen theme clean
gets my prompt back. My terminal wasn't actually
frozen, it was merely lacking a prompt. Of course now it's unthemed.
I've been experiencing this issue, too. The problem can be reproduced simply by running antigen theme <themename>
at the terminal.
same here, antigen theme
is causing the problem.
happening for me as well. Fortunately, it only hangs when trying to apply the same theme so...
replacing
antigen theme candy #or whatever
with
# workaround for https://github.com/zsh-users/antigen/issues/675
THEME=denysdovhan/spaceship-prompt
antigen list | grep $THEME; if [ $? -ne 0 ]; then antigen theme $THEME; fi
allowed me to source .zshrc
Thanks a lot for the workaround @mtyler, it works like a charm! :+1:
@mtyler Erf, not working corretly at the end:
~ at ☸️ microk8s
➜ source ~/.zshrc
_arguments:comparguments:325: can only be called from completion function
_arguments:comparguments:325: can only be called from completion function
denysdovhan/spaceship-prompt @ master
sullivan@sweethome:~%
The theme disappear on a reload. Any idea of why?
Here is my config file:
source ~/.shrc
if [[ ! -a ~/.antigen/antigen.zsh ]]; then
git clone --branch master git@github.com:zsh-users/antigen.git ~/.antigen
# @see https://github.com/zsh-users/antigen/issues/583
cd ~/.antigen && git checkout v2.0.2 && cd -
fi
source ~/.antigen/antigen.zsh
antigen use oh-my-zsh
antigen bundles <<EOBUNDLES
capistrano
cp
emoji
fzf
git
helm
history
sudo
$HOME/.zsh_custom/plugins/palette
$HOME/.zsh_custom/plugins/skaffold
wfxr/forgit
zsh-users/zsh-autosuggestions
zsh-users/zsh-syntax-highlighting
EOBUNDLES
# @see https://github.com/zsh-users/antigen/issues/675
THEME=denysdovhan/spaceship-prompt
antigen list | grep ${THEME}; if [[ $? -ne 0 ]]; then antigen theme ${THEME}; fi
antigen apply
HYPHEN_INSENSITIVE="true"
HIST_STAMPS="yyyy-mm-dd"
setopt HIST_IGNORE_ALL_DUPS
alias zshreload="source $HOME/.zshrc"
# ctrl+space key binding for auto-suggestion
bindkey '^ ' autosuggest-accept
The issue seems to come from denysdovhan/spaceship-prompt
theme.
If I use antigen theme pure
instead, it works like a charm.
Is this issue been resolved, I'm having issues on reload and getting the following:
/Users/artichandok/.zshrc:4: command not found: antigen-use
/Users/artichandok/.zshrc:5: command not found: antigen-bundle
/Users/artichandok/.zshrc:8: command not found: antigen-bundle
/Users/artichandok/.zshrc:14: command not found: antigen-bundle
/Users/artichandok/.zshrc:15: command not found: antigen-bundle
/Users/artichandok/.zshrc:25: command not found: antigen-apply
Here's my .zshrc file:
ZSHA_BASE=$HOME
source $ZSHA_BASE/.zsh-antigen/antigen.zsh
Any ideas? I'm using the nightly version.
+1
+1
+1
For now, I was able to get around this by replacing theme
with bundle
:
# antigen theme denysdovhan/spaceship-prompt
antigen bundle denysdovhan/spaceship-prompt
I still see a long list of Seems robbyrussell/oh-my-zsh is already installed!
however at least the theme loads back after using source ~/.zshrc
happening for me as well. Fortunately, it only hangs when trying to apply the same theme so...
replacing
antigen theme candy #or whatever
with
# workaround for https://github.com/zsh-users/antigen/issues/675 THEME=denysdovhan/spaceship-prompt antigen list | grep $THEME; if [ $? -ne 0 ]; then antigen theme $THEME; fi
allowed me to source .zshrc
Thanks very much, it resolves my problem.
happening for me as well. Fortunately, it only hangs when trying to apply the same theme so...
replacing
antigen theme candy #or whatever
with
# workaround for https://github.com/zsh-users/antigen/issues/675 THEME=denysdovhan/spaceship-prompt antigen list | grep $THEME; if [ $? -ne 0 ]; then antigen theme $THEME; fi
allowed me to source .zshrc
Yes, I use this way to resolve the "hangs indefinitely" after exec "source ~/.zshrc.
But, the new error comes. Time and again, when I open a new tab, it will show "You don't have any bundles", and every time after I exec antigen reset
.
The issue still exists
Use exec zsh
instead of source ~/.zshrc
works for me.
If anyone's using powerlevel9k or powerlevel10k and gets an instant prompt warning when using this method:
THEME=denysdovhan/spaceship-prompt
antigen list | grep $THEME; if [ $? -ne 0 ]; then antigen theme $THEME; fi
You can do this instead:
THEME=romkatv/powerlevel10k
[[ `antigen list | grep $THEME | wc -l` -gt 0 ]] || antigen theme $THEME
Use
exec zsh
instead ofsource ~/.zshrc
works for me.
work for me too, thanks very much!
Description
I was following a tutorial for installing
awscli
and ransource ~/.zshrc
. Ever since, even after resetting my laptop, my terminal now spits out:every time I boot it up.
Not sure what's going on, at all. Don't know why sourcing the zshrc would do this.
Steps to reproduce:
Expected behavior:
Software version
Configuration
I have no
.antigenrc
.zshrc