Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yep, you understood it fine. ('pat' was short for 'pattern'. It was just an example)

Wow, that 'autoescaping the commands in parens' syntax is great. But it doesn't seem to be list related. For example: grep pattern (echo "foo.txt") just passes the result from the echo to grep. It's grep which is doing the right thing with a list, right? Still this is interesting. So fish stuff isn't necessarily written left to right and joined with pipes, instead it's written in nested form like in a more modern langauge.

Alas you still need to use the "find | grep" technique in fish because of the argument size limit. For example:

    grep pattern (find .)
results in:

Failed to execute process '/usr/bin/grep'. Reason: The total size of the argument and environment lists 34kB exceeds the operating system limit of 34kB. Try running the command again with fewer arguments.

The equivalent in bash gives you:

-bash: /usr/bin/grep: Argument list too long



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: