New features in the fish shell
New features in the fish shell
Posted Sep 30, 2020 23:19 UTC (Wed) by johannes (guest, #116140)In reply to: New features in the fish shell by glasserc
Parent article: New features in the fish shell
Surprisingly, a condition for if/while consists of a command plus a tail of and/or commands, see https://github.com/fish-shell/fish-shell/blob/master/src/....
This means you can write chained conditions like this:
if cheap-condition; or expensive-condition-part-1; and expensive-condition-part-2
# body goes here
end
Although as a developer I agree that && and || look better.
Using begin/end for grouping allows for more complex conditions.
Posted Oct 1, 2020 12:36 UTC (Thu)
by widowmaker (guest, #142307)
[Link]
New features in the fish shell
