Skip to content

In what commit/verison were braces allowed? Thank You! #10333

Closed Answered by faho
rickalex21 asked this question in Q&A
Discussion options

You must be logged in to vote

Fish uses begin and end for command grouping, not braces:

ls foo || begin; echo "HI"; end

That is also what the error message tells you.

This is on purpose because it means that the {} symbols are less overloaded. Fish does not try to be bash-compatible and it doesn't shoot for code golf. It is fine if something is a word instead of a symbol, especially when that symbol is already used for something else.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@rickalex21
Comment options

@faho
Comment options

@rickalex21
Comment options

@faho
Comment options

Answer selected by rickalex21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants