Live data from Hacker News

Fish shell 2.1

fishshell.com

61–70 of 154 posts

Re: Fish shell 2.1

#61

This is the biggest change: > http://fishshell.com/release_notes.html > When tab-completing a file, fish will first attempt prefix matches (foo matches foobar), then substring matches (ooba matches foobar), and lastly subsequence matches (fbr matches foobar). For example, in a directory with files foo1.txt, foo2.txt, foo3.txt…, you can type only the numeric part and hit tab to fill in the rest. This is really brillia…

I am looking for something that lets me type the first few letters and when I press the arrow-up key then (maybe in combination with another key), it will only offer those items from the history, which match my previous input. Something like: Type: > ssh press arrow-up: > ssh larry@google.com press arrow-up: > ssh mark@facebook.com

Not sure if that's what you want, but have you tried this in your .inputrc?

  "\e[B": history-search-forward
  "\e[A": history-search-backward

Re: Fish shell 2.1

#62
post #22

With love: I always felt like fish and even zsh are kind of beautiful OCD-induced bouts of counter productivity in the same vain as Dvorak keyboard layouts and Plan 9. We can't handle things being messy and imperfect so we solve it by building our own parallel universes. What do you do when you have to use a computer without your customization? Perfect is the enemy of good, worse is better, join us on the dark side,…

Are we going to use sh and its descendants for the next 100 years? The original shells evolved out of macro processors, and as time went on, more and more programming language features were bolted on, but it's an uneasy fit. Take it for a test: go write a project euler problem (or any small programming task--doesn't have to be math) in your shell of choice. It's painful. There are weird features of shell languages th…

I don't think we are disagreeing. From the tutorial in the OP:

"If you have a strong understanding of other shells, and want to know what fish does differently, search for the magic phrase unlike other shells, which is used to call out important differences."

"stdin and stdout can be redirected via the familiar . Unlike other shells, stderr is redirected with a caret ^"

That's pretty, no argument there. But I already remember to count the std's from 0, so stderr is &2. Not as pretty, fish is nicer, no argument. But its not MUCH nicer, and I'm going to have to use &2 here and there in my life anyway...

So:

- fish has no dedicated syntax for setting variables

- fish does not have an export command

- fish stores the exit status of the last command in $status instead of $?.

- fish does not use backticks ` for command substitutions. Instead, it uses parentheses.. I'm pretty sure good bash form is $() these days, not backticks. So you're spared the dollar sign.

'etc 'etc. I agree we need something to leapfrog what we have but these changes, while nice improvements, seem minor. At least as far as I can see! That's why I asked. Maybe there's some more neat stuff that makes it a significant improvement.

Re: Fish shell 2.1

#64

This is the biggest change: > http://fishshell.com/release_notes.html > When tab-completing a file, fish will first attempt prefix matches (foo matches foobar), then substring matches (ooba matches foobar), and lastly subsequence matches (fbr matches foobar). For example, in a directory with files foo1.txt, foo2.txt, foo3.txt…, you can type only the numeric part and hit tab to fill in the rest. This is really brillia…

I am looking for something that lets me type the first few letters and when I press the arrow-up key then (maybe in combination with another key), it will only offer those items from the history, which match my previous input. Something like: Type: > ssh press arrow-up: > ssh larry@google.com press arrow-up: > ssh mark@facebook.com

In your ~/.inputrc

"\e[A": history-search-backward

"\e[B": history-search-forward

Re: Fish shell 2.1

#65
Maybe it's just because I really like to customize my shell, but I can't stand the philosophy of fish [1]. The relevant part: "Configurability is the root of all evil." I can almost agree with this on many user facing consumer applications but a shell is so far from that.

[1]: http://ridiculousfish.com/shell/user_doc/html/design.html#co...

Re: Fish shell 2.1

#66

Earlier quoted context omitted.

I am looking for something that lets me type the first few letters and when I press the arrow-up key then (maybe in combination with another key), it will only offer those items from the history, which match my previous input. Something like: Type: > ssh press arrow-up: > ssh larry@google.com press arrow-up: > ssh mark@facebook.com

Not sure if that's what you want, but have you tried this in your .inputrc? "\e[B": history-search-forward "\e[A": history-search-backward

Looks interesting. How would I use that afterwards?

Re: Fish shell 2.1

#67
post #58

Installing fish instead of bash was the biggest single productivity improvement that I've ever done. Thanks for your work!

Could you give a little insight into what you liked/disliked about it?

First of all, color; it's a pretty basic thing, but tremendously helps understanding information on screen. Then, there's scripting; I'm a newbie in shell scripting, but being able to pass results of some commands into others with brackets is much more intuitive and comfortable than using the pipe.

The main thing that I disliked is that all web resources give you scripts and advice for bash/sh; I have routinely launched bash to use them, but every time I felt like I'm going to a handicapped version of console.

Re: Fish shell 2.1

#68
post #59
post #22

With love: I always felt like fish and even zsh are kind of beautiful OCD-induced bouts of counter productivity in the same vain as Dvorak keyboard layouts and Plan 9. We can't handle things being messy and imperfect so we solve it by building our own parallel universes. What do you do when you have to use a computer without your customization? Perfect is the enemy of good, worse is better, join us on the dark side,…

I really don't think that zsh is born of some desire to keep things from getting messy. That doesn't seem to be what it does in practice anyway, particularly with the popularity of things like oh-my-zsh. Rather I think zsh is born from a desire to have more . More functionality and more customization options. > What do you do when you have to use a computer without your customization? How are people running into this…

I'm kind of posting too much so I'll stop, I really tried to phrase my questions in a friendly manner but it seems they invite misreadings. Apologies. One final clarification:

I agree with this attitude if indeed this was the case. I don't see how zsh or fish constitute cordless drills and screwdrivers, it feels more like they are the right-y version to the left-y version of the regular screwdriver.

But maybe its because I don't know their killer features, I always try to pay attention to them and play with them occasionally but it never clicked for me why its so much better.

Re: Fish shell 2.1

#70

This is the biggest change: > http://fishshell.com/release_notes.html > When tab-completing a file, fish will first attempt prefix matches (foo matches foobar), then substring matches (ooba matches foobar), and lastly subsequence matches (fbr matches foobar). For example, in a directory with files foo1.txt, foo2.txt, foo3.txt…, you can type only the numeric part and hit tab to fill in the rest. This is really brillia…

I am looking for something that lets me type the first few letters and when I press the arrow-up key then (maybe in combination with another key), it will only offer those items from the history, which match my previous input. Something like: Type: > ssh press arrow-up: > ssh larry@google.com press arrow-up: > ssh mark@facebook.com

This is actually the feature of fish I use the most and is the primary reason I always install fish on my servers. Automatic history search using the up-arrow is fantastic.
Post reply on HN