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

It’s quite funny and sad (no disrespect to OP or anybody) how people is still discovering what we people on fish take for granted. We can even auto-complete parameters only if we so wish. No need for any hidden setting, no need to install any additional (and usually heavy) packages. Built-in, baby.

I started using it when it was known as Ridiculous Fish, circa 2009-2010, and I've never looked back. I also learned ways of moving around the shell with Readline commands, but I cannot really attribute that to fish; I think I did that on bash/zsh as well.

I don’t have too many functions, so I cannot really say which one is really better as far as scripting goes, but with enough aliases and fish built-in functionalities, you’re pretty much set.



I've been using fish for several years now, but I always have to jump back to bash when I need to write an moderately complex command.

Does anyone know if there's an equivalent of Bash's `(...)` (without '$') in fish? What about anonymous pipes `<(...)` and `>(...)`?


The anonymous pipes are also called "process substitution", and are done with `psub` in fish:

    sjl at alephnull in ~/scratch/tmp
    ><((°> diff -U0 (ls -1 | psub) (ls -1 | grep -v foo | psub)
    --- /tmp/.psub.cIcXKeQj3O       2019-10-10 10:21:58.940444840 -0400
    +++ /tmp/.psub.7W6mBnxcQD       2019-10-10 10:21:58.952444799 -0400
    @@ -3 +2,0 @@
    -foo


Amazing, this is exactly what I was looking for. Thanks!


zsh has many of these features also.

edit: not sure if it does out of the box actually, i use prezto


Exactly. I cannot answer for sure because it’s been years since last time I checked, but back then (and from comments here in previous thread, I’d say still) people was required to install extra packages to acquire such functionalities, and usually they would be a bit bloated.




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

Search: