zap-zsh / zap

:zap: Zap is a minimal zsh plugin manager
https://www.zapzsh.com/
GNU General Public License v3.0
971 stars 35 forks source link

Add ability to don't touch .zshrc on first install (like in v0.2) #166

Closed Andrew15-5 closed 1 year ago

Andrew15-5 commented 1 year ago

If the feature request is for a plugin or theme, specify it here.

No response

If the feature solves a problem you have, specify it here.

I was having this in my .zshrc when the manager was at v0.2:

if ! [ -f $HOME/.local/share/zap/zap.zsh ]; then
  curl -s https://raw.githubusercontent.com/zap-zsh/zap/master/install.zsh | zsh
fi
source $HOME/.local/share/zap/zap.zsh

Describe the proposed feature.

I want some kind of flag to be able to run install.zsh without it touching my already configured .zshrc file.

Something like: --skip-zshrc-init, --no-zshrc-init, --no-zshrc-touch.

Describe alternatives you've considered

I just thought about making the curl output being run through a regex, but this is probably risky, since the file can be changed at any time (I don't control it). Previous versions could be changed too due to force push. So, I want to play it save and have some kind of flag/option when installing zap.

Additional context

No response

Related Issues

No response

wintermi commented 1 year ago

This is already available using the --keep flag.

Execute the following:

zsh <(curl -s https://raw.githubusercontent.com/zap-zsh/zap/master/install.zsh) --branch release-v1 --keep
Andrew15-5 commented 1 year ago

Thank you so much. That's great!