jbang icon indicating copy to clipboard operation
jbang copied to clipboard

Opt out of automatic shell setup

Open panicbit opened this issue 2 months ago • 9 comments

JBang has no business to mess with my shell config files (.bashrc, .zshrc, etc.) without my consent. There should at least be a way to opt out of it via config.

panicbit avatar Nov 13 '25 16:11 panicbit

Don't call setup?

Use your package manager to install?

maxandersen avatar Nov 13 '25 18:11 maxandersen

Setup is called automatically by jbang app install.

panicbit avatar Nov 13 '25 19:11 panicbit

Actually, it seems like setup is not called automatically anymore once .jbang/bin is in the path. Is that correct?

panicbit avatar Nov 13 '25 19:11 panicbit

Is that correct?

That is correct.

quintesse avatar Nov 13 '25 21:11 quintesse

Alright, that is good enough for me (although I would still prefer a warning or a prompt instead of just doing something behind my back). Thanks!

panicbit avatar Nov 13 '25 22:11 panicbit

I actually think you're not wrong about that. I'm not sure if we would want to handle this better and if so, how exactly, but it could be useful to keep the issue open.

quintesse avatar Nov 13 '25 22:11 quintesse

so you are not talking about when using jbang setup (i..e when using curl), but when doing jbang app install and somehow jbang is not in the path (so you must have called it via /some/specific/pathtojbang/bin/jbang app install) ?

maxandersen avatar Nov 16 '25 07:11 maxandersen

jbang not being in $PATH wasn't the issue. It was about the folder where jbang stores apps. I did install jbang manually from GitHub releases.

Also note that in my specific case, no amount of calling setup would have any effect on my $PATH, since I am using neither bash nor zsh.

panicbit avatar Nov 16 '25 08:11 panicbit

I think we are talking past each other. Can you be specific about which sequence of commands you are running (which does not include calling setup which explicitly is you asking jbang to be setup) that is behaving badly ?

maxandersen avatar Nov 16 '25 14:11 maxandersen