You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
One thing with fish that I've stumbled over multiple times across years of usage, are situations of this kind: when I have a pipe, and need to inject another command into just one end of the pipe. Nigh realistic example:
... which of course fails with fish: Illegal command name “{”.
It's not my aim to discuss syntax here; I was able to somehow discover the proper way to say it in fish:
🐟 begin echo ccc; echo zzz; echo aaa; end | sort
aaa
ccc
zzz
🐟 begin sleep 0.1; printf 'GET / HTTP/1.1\nHost: example.net\n\n'; end | openssl s_client -connect example.net:443 -crlf -servername example.net -quiet
What I want to raise issue with — it's too easy to forget and too hard to rediscover. The quick syntax guide, upon skimming, doesn't give answers. begin; end is demonstrated just once, in an example for something different; not easy to spot when you "don't know what you're looking for".
Better yet. Can fish suggest begin; end in the error message for Illegal command name “{”?
Just like it does in Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'.
I think I can roll an easy patch for this — if it sounds good, and the community approves. RFC!
The text was updated successfully, but these errors were encountered:
Better yet. Can fish suggest begin; end in the error message for Illegal command name “{”?
Just like it does in Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'.
A helpful error message would definitely be a great change. It might not
be straightforward because of brace expansion but maybe there's a
simple way to do it.
Btw fish 3 does support && and || :)
Supporting brace grouping natively could be a possibility for the future.
Or ship abbreviations like abbr { begin, but that doesn't work as of now.
Hi!
One thing with fish that I've stumbled over multiple times across years of usage, are situations of this kind: when I have a pipe, and need to inject another command into just one end of the pipe. Nigh realistic example:
With this example, I need to test the server request timeout.
So my bash muscle does this before I even think:
... which of course fails with
fish: Illegal command name “{”
.It's not my aim to discuss syntax here; I was able to somehow discover the proper way to say it in fish:
What I want to raise issue with — it's too easy to forget and too hard to rediscover. The quick syntax guide, upon skimming, doesn't give answers.
begin; end
is demonstrated just once, in an example for something different; not easy to spot when you "don't know what you're looking for".Better yet. Can fish suggest
begin; end
in the error message forIllegal command name “{”
?Just like it does in
Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'
.I think I can roll an easy patch for this — if it sounds good, and the community approves. RFC!
The text was updated successfully, but these errors were encountered: