I have:
I get this error on Hyper and iTerm when I try to source my .zshrc file.
prompt_pure_setup:shift:1: shift count must be <= $#
Any insight would be appreciated! Thanks!
I've also tried uninstalling the global node_module of pure-prompt and removing the directory. And then removing async and pure from zsh_functions. Then installing pure manually by cloning the repo and linking the pure.zsh and async.zsh. But I get the same error when I source my .zshrc.
.zshrc:ZSH_THEME=""
plugins=(git)
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
source $ZSH/oh-my-zsh.sh
autoload -U promptinit; promptinit
prompt pure
source /Users/username/Downloads/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Thanks for the report.
Interestingly I was able to reproduce thanks to your mention of source ~ /.zshrc. The underlying issue seems to be that when you source your rc-file, prompt pure gets run a second time. This time around it has already been autoloaded and, turns out, not called with any parameters.
This means our initial assumption about the loading beahavior is incorrect and the code must change, I'll push a fix tomorrow.
Meanwhile, I would strongly discourage the usage of source ~/.zshrc to reload shell configuration simply because this re-evaluates everything while not erasing the old. This means you could end up with duplicate states. A simple exec zsh would suffice. What exec does is it replaces your shell with the command following, since it's zsh it replaces your shell with a clean instance.
Landed in 1.5.1 馃帀.
Most helpful comment
Thanks for the report.
Interestingly I was able to reproduce thanks to your mention of
source ~ /.zshrc. The underlying issue seems to be that when yousourceyour rc-file,prompt puregets run a second time. This time around it has already beenautoloadedand, turns out, not called with any parameters.This means our initial assumption about the loading beahavior is incorrect and the code must change, I'll push a fix tomorrow.
Meanwhile, I would strongly discourage the usage of
source ~/.zshrcto reload shell configuration simply because this re-evaluates everything while not erasing the old. This means you could end up with duplicate states. A simpleexec zshwould suffice. Whatexecdoes is it replaces your shell with the command following, since it'szshit replaces your shell with a clean instance.