2 ms·
Cool tool. I think what would really be the icing on the cake is if it substitued the actual command into the documentation. Removing that one layer of indirect
by kevincox 10y ago
Cool tool. I think what would really be the icing on the cake is if it substitued the actual command into the documentation. Removing that one layer of indirection would make it that much easier to understand.
For example:
foo() { bar }
> This defines a function named "foo".
Also that example fails to parse. Even though :() { :|: };: works so it seems like there is a certian amount of special casing.
- idank 10y agoThat's an awesome idea. I'd love to try that one day. Your command isn't valid because it's missing a control character after 'bar', such as ';'. Bash rejects it as well: $ bash -c "foo() { bar }" bash: -c: line 1: syntax error: unexpected end of file
- kevincox 10y agoOops, you are right, that's what I get for testing on zsh :(