News for hackers. Stuff that matters.
Re:Fish shell 2.0 by barrkel on Friday May 17, 2013 @09:28AM (#5724164)
Do you know the equivalent to Alt+. in readline?

And how to incrementally search the history (i.e. anywhere in the command, not just the start of the line like the autocomplete)?

And does fish really need to separate out its subshell from text substitution? E.g. I'd write 'echo "my host is $(hostname)."' in bash, but in fish I seem to need to use 'echo "my host is " (hostname) "."', which is a lot more fiddly, noisy, ugly etc.

And do you know the equivalent of <() in bash? I use that with fgrep -f a lot. And (<todo.txt)? That's another one I use in workflows, though (cat todo.txt) would be a verbose alternative.

Re:Fish shell 2.0 by micampe on Friday May 17, 2013 @09:36AM (#5724209)
(I actually don't use fish full time, been experimenting once in a while)

I believe Alt+. (or any kind of history substitution) hasn't been implemented by design. I don't have references handy but they should be easy to find.

Incremental history search is just type something and then up arrow.

The rest of your questions I don't know the answers but it wouldn't surprise me if there were none. Fish prefers to have a simple and coherent syntax to a concise one (though I agree the text substitution is annoying – it seems they usually put the subshell result in a variable and expand that in the string).

This helps understanding their design goals http://ridiculousfish.com/shell/user_doc/html/design.html

Re:Fish shell 2.0 by siteshwar on Friday May 17, 2013 @01:14PM (#5725546)
Updated design documentation can be found at http://fishshell.com/docs/2.0/design.html
Re:Fish shell 2.0 by barrkel on Friday May 17, 2013 @02:20PM (#5725903)
Thanks for your answers.

Incremental search isn't too bad once I found out about bind and the other key bindings, as the arrow keys are some distance from the home keys.

Lack of Alt+. quickly became annoying. It's so useful; meanwhile, prefix search isn't a significant improvement over incremental search, and I usually know ahead of time whether my command is in the history or not, so being prompted an irrelevance is more annoying than having to type Ctrl+R in readline. I disable auto-completion in browsers, Google etc. for similar reasons.

You're right about not much else. Command substitution is the only thing implemented, not subshells or process substitution. I probably exercise my shell more than average, so I don't think fish is feature-rich enough yet for me.

It's a good thing the design goals have been updated to remove "a large performance decrease [...] is acceptable in order to improve [modularity]". That would have been a total killer. Process forking is often a performance limitation for me in the shell, so I strive, wherever possible, to use the builtins that fish so proudly spurned.

Re:Fish shell 2.0 by sagarm on Friday May 17, 2013 @02:42PM (#5726021)
<($cmd) is called "process substitution." The fish equivalent is

($cmd | psub)

I miss incremental history search myself -- that's probably my most used bash feature. Typing a few letters and then hitting C-P or up arrow works, but there's no way to refine the search if you don't get the result you're looking for.

Re:Fish shell 2.0 by mixmastamyk on Friday May 17, 2013 @12:01PM (#5725139)

     echo my host is (hostname).
Doesn't need quotes.