3 ms·
One thing that holds me back from using FISH is the inability to declare variables at the CLI. I.E. VAR1=test echo $VAR1
by UI_at_80x24 2y ago
One thing that holds me back from using FISH is the inability to declare variables at the CLI.
I.E.
VAR1=test
echo $VAR1
- lawrencejgd 2y agoYes you can, I just tested it in version 3.7.1.
- UI_at_80x24 2y agoThats awesome to hear. thank-you
- tpoacher 2y agothis fails in bash too, no?
- UI_at_80x24 2y agoNo.
- tpoacher 2y agoVar1=test echo $var1 will fail unless you are using an external echo command, which is unlikely the bash builtin echo will fail to see var1 because this declaration at the command level only affects subshells So yes.
- y1zhou 2y agoSupport was added for this a few versions back and made life much easier!
- eddd-ddde 2y agoYou mean "set VAR1 test"? Isn't that the same? Or you specifically want the other syntax? Edit: just realized you meant env variables... Yeah, this is one thing I also miss, but definitely still prefer fish personally.