Closed jankatins closed 2 years ago
This shall be the same bug as in #147
For me atclone
seems to be running after the commands it is supposed to proceed.
For example trying to add stripe
cli completion:
zi wait='1b' lucid light-mode for \
id-as="stripe/completion" \
as="completion" \
has='stripe' \
atclone="stripe completion --shell zsh" \
mv="stripe-completion* -> _stripe" \
atpull="%atclone" \
blockf zdharma-continuum/null
The mv
command will run before atclone
is finished because it will complain that no files matched, but when the install is finished, you will find that the file is actually there
I had the same issue for completion with atclone atpull and kubectl
The completion is not loading and stays uninstalled like in #147
I found a workaround:
zinit delete --clean
zinit cclear
zinit wait lucid for \
as"completion" https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker \
as"completion" has"kubectl" id-as"kubectl--completion" atpull'%atclone' atclone"kubectl completion zsh > _kubectl; zinit creinstall -q kubectl--completion" run-atpull nocompile zdharma-continuum/null
Maybe it'll help someone.
@smac89
For me
atclone
seems to be running after the commands it is supposed to proceed.For example trying to add
stripe
cli completion:zi wait='1b' lucid light-mode for \ id-as="stripe/completion" \ as="completion" \ has='stripe' \ atclone="stripe completion --shell zsh" \ mv="stripe-completion* -> _stripe" \ atpull="%atclone" \ blockf zdharma-continuum/null
The
mv
command will run beforeatclone
is finished because it will complain that no files matched, but when the install is finished, you will find that the file is actually there
You're overcomplicating things, look at stripe completion --help
zi for \
as'completion' \
atpull'%atclone' \
blockf \
from'gh-r' \
nocompile \
atclone"./stripe completion --shell zsh --write-to-stdout > _stripe" \
sbin'stripe' \
stripe/stripe-cli
Installing completion and zinit update --urge
work fine.
An added benefit is it also installs the stripe
cli binary, cool!
~/.local/share/zsh/zinit/plugins
ᐳ zi delete stripe/stripe-cli -y; exec zsh; zi report stripe/stripe-cli
bin-gem-node annex: Correctly removed the stripe shim from $ZPFX/bin
Done (action executed, exit code: 0)
Downloading stripe/stripe-cli…
(Requesting `stripe_1.8.1_linux_x86_64.tar.gz'…)
################################################################################################################################################################### 100.0%
ziextract: Unpacking the files from: `stripe_1.8.1_linux_x86_64.tar.gz'…
ziextract: Successfully extracted and assigned +x chmod to the file: `stripe'.
bin-gem-node annex: Created the stripe shim and set +x on the stripe binary
Installed 1 completions. They are stored in the $INSTALLED_COMPS array.
~/.local/share/zsh/zinit/plugins
ᐳ zi report stripe/stripe-cli
Report for stripe/stripe-cli plugin
-----------------------------------
Completions:
_stripe [enabled]
~/.local/share/zsh/zinit/plugins
Given that I run my zinit update in a (non interactive) script, my original problem is (almost surely) fixed by #199 / #227. I'm closing this therefore.
Issue description
I run
zinit update
and this breaks my starship setup as it seems the atclone stanza is not rerun after updating the program:After an update via
zsh -c "source ~/.zinit/bin/zinit.zsh && zinit update"
After
rm -rf .zinit/plugins/starship---starship/
and opening a new terminal tab:zinit config
zinit version or commit ID
789eb023b10764392739831061d0b4b336aa227c
zsh version
5.8
host info
CPUTYPE=x86_64 MACHTYPE=x86_64 XDG_SESSION_TYPE=wayland OSTYPE=linux-gnu 5.15.0-2-amd64 ID=debian