Live data from Hacker News

Fish shell

fishshell.com

161–170 of 188 posts

Re: Fish shell

#161

Earlier quoted context omitted.

In bash, you hit Ctrl-R on the empty prompt and type "w": (reverse-i-search)`w': echo wow Hit return to execute, or any motion keys to start editing. It was the first thing I missed in Fish.

I'm not sure how that is functionally different to mintplant's example? In fish you just type 'w' hit the up arrow and then hit enter to execute or any motion keys to edit. The same number of keypresses as well. Am I misunderstanding?

Discoverability. With fish i would have to type something that would be a good match to the command i want to re-run before pressing up. With bash i type ctrl+r and start typing and i can continue to type until it's narrowed down to the correct command.

Re: Fish shell

#162
3 years using Fish shell now, and wouldn't go back to anything else. The autocompletion (including fuzzy matching) feature is just so vastly better than in other shells.

I must say I am not a huge shell wizard and use only a handful of custom functions, but I've found shell to be very pleasant to work with and would recommend it to any web developer who doesn't get "dirty" with shell scripting a lot.

The only problem I had was that I had to explicitly set the shell used by vim in order to make vim plugins / configs work properly by using this line:

set shell=/bin/bash

Re: Fish shell

#163

Hey, I'm the lead dev of the fish shell. There's some great discussion in this thread! For those who are interested, the fish shell is about to release version 2.2, a very significant release that wraps up eighteen months of development. You can try the beta now: http://fishshell.com/beta/ A sampling of new features: - vi mode (yay!) - Abbreviations, fish's take on aliases. They expand as you type them. - A new "inli…

Amazing stuff! Thanks to all the Fish team for your amazing work. I've been a Fish user for 3 years and wouldn't use anything else. The vi mode is a killer feature for me, so cool!

I couldn't find any information about the team though, maybe it would be a good idea to include some kudos on the website / on github just to show that real people are involved in this project. Personally, it always makes me be grateful.

Cheers!

Re: Fish shell

#164

Fun with fish, frogs and fortunes: https://gist.github.com/montanaflynn/04246fc5da998d15e713

https://github.com/qznc/dot/blob/master/config/fish/config.f...

I use something similar: tux instead of frogs and a personal fortunes file. Mine also prints the current date, hostname and uptime.

Re: Fish shell

#165

I used fish for at least a year, maybe more. I eventually switched away to zsh. Whichever theme I used, rendering the status of git repos took ages, and the breaks from Bash syntax were just a bit too much. I loved the overall friendliness though, it was a genuine pleasure to use for the most part. I hope to use it as my default shell again some time in the future.

> Whichever theme I used, rendering the status of git repos took ages I don't think this is fish's issue. In fact, this will happen in any shell (bash / zsh) if your git repo is big. The solution is either (0) speed up `git status`-like commands by enable git cache, or (1) use async showing git repo status just like prezto.

Would you mind elaborating a bit? When I switched to zsh I started with oh-my-zsh but soon uninstalled it as it was too much for my needs. I started again with simple .zshrc file and I'm hesitant to going back to frameworks like prezto but working on a really big project in git slows down zsh noticeably.

Re: Fish shell

#166
post #46

I definitely recommend fish to every newcomer to Unix. It has sane defaults, colorful output, and so many features that work out of the box. That said, there is a long-standing issue regarding inline environment variables.[1] Briefly speaking, fish does not recognize the `NAME=value command` form. So you should use `env` to work around this. This may not be a deal breaker, but I'm a bit annoyed, and migrated to zsh.…

>There is no place for bash.

Just curious, why do you say this? I've used bash for years for basic command line things and now it sounds like I've been missing out on great features that other shells have.

Re: Fish shell

#167
post #71
post #65

Earlier quoted context omitted.

Bad developers. For example, I used Arch Linux for a number of years, where `/bin/sh` is a symlink to bash. Switching that to point to `dash` broke a number of programs both in the official repositories and the AUR. A lot of shell scripters can't spot a bashism, and just as many don't know that other shell syntax even exists.

That's a different problem, though. /bin/sh must point to a sh-compatible shell. fish is not a sh-compatible shell. Therefore, any script using /bin/sh will never attempt to run as fish (as /bin/sh will never point to fish). The reason I'm having a hard time imagining how a scripting system that relies on bash would fail with fish is because I can't imagine how one would actually write a script that is executed with…

There's just one scenario: a completely absent #! line.

It's an easy fix, just add the line, otherwise 0755 scripts with no #! do execute using the current shell.

Re: Fish shell

#168
post #148

Hey, I'm the lead dev of the fish shell. There's some great discussion in this thread! For those who are interested, the fish shell is about to release version 2.2, a very significant release that wraps up eighteen months of development. You can try the beta now: http://fishshell.com/beta/ A sampling of new features: - vi mode (yay!) - Abbreviations, fish's take on aliases. They expand as you type them. - A new "inli…

Hi, can you tell how it competes to cmder and iterm? I use these currently in windows and osx

I can't believe I'll live the day to see somebody confusing a shell and a terminal emulator on Hacker News.

What happened?

Re: Fish shell

#169
post #46

I definitely recommend fish to every newcomer to Unix. It has sane defaults, colorful output, and so many features that work out of the box. That said, there is a long-standing issue regarding inline environment variables.[1] Briefly speaking, fish does not recognize the `NAME=value command` form. So you should use `env` to work around this. This may not be a deal breaker, but I'm a bit annoyed, and migrated to zsh.…

>There is no place for bash. Just curious, why do you say this? I've used bash for years for basic command line things and now it sounds like I've been missing out on great features that other shells have.

Sorry if my words were too strong. I said that because I like tools that do a particular job well. bash might be a middle ground tool that has moderately sane defaults and features. However, in other words, bash is inferior to fish with regard to easiness, and is worse than zsh with regard to feature set. I'm not a fan of such a tool.

I believe the world could have been a better place if they adopted fish as a default shell.

Re: Fish shell

#170

Earlier quoted context omitted.

> ^R is more powerful, though; it matches at any point in previous commands, not just at the beginning. That's how it works in Fish as well. user@system ~> echo wow wow user@system ~> echo something something user@system ~> wow█ ...press the up arrow and the current line becomes... user@system ~> echo wow█

In bash, you hit Ctrl-R on the empty prompt and type "w": (reverse-i-search)`w': echo wow Hit return to execute, or any motion keys to start editing. It was the first thing I missed in Fish.

In fish, you type "w" on the empty prompt and hit Up:

    > echo w̲ow
Hit return to execute, or any motion keys to start editing. As long as you don't move sideways, you can repeatedly press up or down to navigate history. The underline is actually a highlight hinting at the substring match in the line.

The difference is that typing an additional character after having moved in the history will start editing, appending the character to the line, instead of appending to the criteria.

What I miss in all of them is looking for a fuzzy match instead of a substring match.

Post reply on HN