News for hackers. Stuff that matters.
Re:Fish shell announces 4.0 release by UI_at_80x24 on Thursday December 19, 2024 @02:00PM (#42464618)
One thing that holds me back from using FISH is the inability to declare variables at the CLI.

I.E. VAR1=test echo $VAR1

Re:Fish shell announces 4.0 release by lawrencejgd on Thursday December 19, 2024 @02:11PM (#42464722)
Yes you can, I just tested it in version 3.7.1.
Re:Fish shell announces 4.0 release by UI_at_80x24 on Thursday December 19, 2024 @03:13PM (#42465260)
Thats awesome to hear. thank-you
Re:Fish shell announces 4.0 release by tpoacher on Thursday December 19, 2024 @07:30PM (#42467199)
this fails in bash too, no?
Re:Fish shell announces 4.0 release by UI_at_80x24 on Thursday December 19, 2024 @09:02PM (#42467589)
No.
Re:Fish shell announces 4.0 release by tpoacher on Saturday December 21, 2024 @08:41PM (#42483822)
Var1=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.

Re:Fish shell announces 4.0 release by eddd-ddde on Thursday December 19, 2024 @09:13PM (#42467661)
You 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.