▲ | js2 7 days ago | ||||||||||||||||
> export IS_SANDBOX=1 && claude --dangerously-skip-permissions FYI, this can be shortened to:
You don't need the export in this case, nor does it need to be two separate commands joined by &&. (It's semantically different in that the variable is set only for the single `claude` invocation, not any commands which follow. That's often what you want though.)> I asked Claude to rename all the files and I could go do something else while it churned away, reading the files and figuring out the correct names. It's got infinite patience for performing tedious tasks manually and will gladly eat up all your tokens. When I see it doing something like this manually, I stop it and tell it to write a program to do the thing I want. e.g. I needed to change the shape of about 100 JSON files the other day and it wanted to go through them one-by-one. I stopped it after the third file, told it to write a script to import the old shape and write out the new shape, and 30 seconds later it was done. I also had it write me a script to... rename my stupidly named bank statements. :-) | |||||||||||||||||
▲ | jama211 6 days ago | parent | next [-] | ||||||||||||||||
This. I had a 10000 line css file, and told it to do a find and replace on some colours. It was hilariously bad at this and started chewing tokens. Asking it to write a script to swap it out and then execute that script for me and it was done instantly. Knowing the right questions to ask an AI is everything. | |||||||||||||||||
| |||||||||||||||||
▲ | Dragonai 6 days ago | parent | prev | next [-] | ||||||||||||||||
> It's got infinite patience for performing tedious tasks manually and will gladly eat up all your tokens. When I see it doing something like this manually, I stop it and tell it to write a program to do the thing I want. This is so funny. Thank you for sharing :) | |||||||||||||||||
▲ | indigodaddy 7 days ago | parent | prev | next [-] | ||||||||||||||||
Does it even work with the &&? Iirc, I've never had luck putting env vars before the && and always had to do it the way you describe | |||||||||||||||||
| |||||||||||||||||
▲ | kiitos 6 days ago | parent | prev | next [-] | ||||||||||||||||
make it work more generally via `env`
not all shells support FOO=bar prefixes, in particular fish does not, but the above works everywhere | |||||||||||||||||
| |||||||||||||||||
▲ | ActionHank 7 days ago | parent | prev [-] | ||||||||||||||||
Can shorten further to rm -rf / |