TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Fish shell 2.0

272 pointsby siteshwarabout 12 years ago

22 comments

SnowLprdabout 12 years ago
🐟 Fish rocks. I've been using it exclusively for the last year, and I can't imagine giving it up.<p>There seem to be a number of misconceptions, which I will endeavor to address. The first is: "Fish isn't POSIX/bash-compliant, so there are compatibility problems." POSIX non-compliance is a feature, not a disadvantage, of the fish shell. It means there is less legacy baggage and syntactical inconsistency. I can count the number of POSIX/bash compliance-related issues I've had with fish on one hand, all of which were easily dealt with. For example, Vim assumes that your shell is <i>sh</i> compatible, but adding <i>set shell=sh</i> in your .vimrc solves that. The only other significant one for me was virtualenvwrapper, which doesn't support fish. Not a problem: Virtualfish solves that handily: <a href="https://github.com/adambrenecki/virtualfish" rel="nofollow">https://github.com/adambrenecki/virtualfish</a><p>Want to run a bash script? Just run <i>bash fooshnizzle.sh</i>. Want to switch to bash for a moment? Run <i>bash</i> and then <i>exit</i> when you want to switch back to fish. This POSIX-compatibility topic is, in my opinion, much ado about nothing.<p>Another misunderstanding seems to be, "I can do XYZ in bash, but fish doesn't support that." Fish purposefully limits the number of "builtins" -- commands that fish includes by default -- in order to maintain simplicity. For me, that's a feature. When I find that there's something I want to be easier to do in fish, I whip up a tiny function to do it. Not only is that extremely easy to do in fish, but then that command performs precisely the way <i>I</i> want it to. I haven't pushed many of those to my dotfile repository yet, but you can check out some of my fish functions there: <a href="https://github.com/justinmayer/dotfiles/tree/master/fish" rel="nofollow">https://github.com/justinmayer/dotfiles/tree/master/fish</a><p>Fish is fast, the auto-completion is amazingly helpful, and it's intuitive to use without too much configuration. Give it a try. 🐟
评论 #5726536 未加载
评论 #5725157 未加载
评论 #5726043 未加载
评论 #5731835 未加载
krat0sprakharabout 12 years ago
I've been a zsh user for a long time and I have to say that fish is great! Its super fast and starts almost instantaneously. On zsh, I would always use fasd[0] to help jump directories, but on fish I dont feel the need. The auto-completion is just fantastic. If I were you, I'd give it a try just for the awesome tab completions. For the 'oh-my-zsh' lovers out there, there's 'oh-my-fish' as well - <a href="https://github.com/bpinto/oh-my-fish" rel="nofollow">https://github.com/bpinto/oh-my-fish</a><p>[0] - <a href="https://github.com/clvv/fasd" rel="nofollow">https://github.com/clvv/fasd</a>
评论 #5723297 未加载
评论 #5723636 未加载
评论 #5723700 未加载
c-oreillsabout 12 years ago
Are there still compatibility issues with using fish 2.0 as your default shell? The Arch Wiki [0] advises against it because it's non bash compliant.<p>I'm going to give it a go regardless but wanted to know if there were pitfalls and what people have done to alleviate them.<p>[0] <a href="https://wiki.archlinux.org/index.php/Fish#Troubleshooting" rel="nofollow">https://wiki.archlinux.org/index.php/Fish#Troubleshooting</a>
评论 #5723650 未加载
评论 #5726423 未加载
评论 #5723390 未加载
评论 #5723435 未加载
评论 #5723374 未加载
评论 #5723421 未加载
barrkelabout 12 years ago
The documentation needs a lot of work. Every 'help' command I've tried just pops up a web page using xdg-open, which (a) won't work well in a headless SSH session, never mind a plane, and (b) doesn't make it easy to search for specifics.<p>I also don't like the implementation of the prompt text as a function. It's the first thing I wanted to customize, and it looks like I need to copy and paste the existing definition of fish_prompt and hack it into shape. There's no built-in equivalent of \$, so you need to find out if you're root and do it yourself. And the existing check just does it with a string compare of $USER with 'root', rather than euid==0.<p>Hacking preferences in like this isn't a problem to begin with. The real problem comes down the road, when the defaults change and improve, and you now have to be concerned with merging your customizations with the new and improved stuff.
评论 #5724366 未加载
评论 #5725630 未加载
评论 #5724117 未加载
acron0about 12 years ago
Why is no one putting in any time to replace the Windows shell (cmd.exe)? The stock offering is abysmal and Cygwin isn't much better. We could really use something with a bit of panache like this... Hmmm..
评论 #5723712 未加载
评论 #5723756 未加载
评论 #5724007 未加载
评论 #5723690 未加载
评论 #5723702 未加载
评论 #5723677 未加载
评论 #5723686 未加载
评论 #5724109 未加载
评论 #5724657 未加载
评论 #5724048 未加载
评论 #5724562 未加载
评论 #5723927 未加载
评论 #5723849 未加载
评论 #5726338 未加载
评论 #5729741 未加载
leejoramoabout 12 years ago
How long does it take for something to show up in brew? I see that Fish has a pull request issued a five hours ago, but I see quite a number of other items have pull requests going back months.
评论 #5723978 未加载
评论 #5726616 未加载
评论 #5724342 未加载
aditoabout 12 years ago
IF YOU READ THIS, YOU MUST TRY fish NOW!!!<p>Really, this 100x better than bash.<p><pre><code> 1. download and install[0] 2. read the tutorial[1] 3. ... 4. profit </code></pre> [0]: <a href="http://fishshell.com/#platform_tabs" rel="nofollow">http://fishshell.com/#platform_tabs</a><p>[1]: <a href="http://fishshell.com/tutorial.html" rel="nofollow">http://fishshell.com/tutorial.html</a>
netmuteabout 12 years ago
I've tried fish a few years ago and wasn't all that impressed with the features.<p>That said, the new version is just ace! I gave it 30 minutes and it basically does everything I do with zsh right now. All that with about 5% of the configuration effort I put into zsh. Plus, it's so much faster than zsh.<p>I'll give fish a go as my main shell. Let's see were this goes.
评论 #5723796 未加载
iziettoabout 12 years ago
Thanks for all the Fish!!!<p><pre><code> _J""-. .-""L_ /o ) \ ,'; ;`, / ( o\ \ ,' ; / \ ; `, / "-.__.'"\_; ;_/"`.__.-"</code></pre>
gdonelliabout 12 years ago
Nice work. Please consider to code-signing the package so that it works nicely with Mountain Lion gatekeeper.
评论 #5723384 未加载
评论 #5723356 未加载
oneandoneis2about 12 years ago
Great.. here I am all ready to try switching to zsh and now here's a new fish..<p>Which to go for..?
评论 #5723422 未加载
评论 #5723344 未加载
评论 #5723304 未加载
评论 #5723321 未加载
评论 #5723319 未加载
andy_bootabout 12 years ago
Can anyone tell me if fishshell 2.0 works with RVM and Virtualenvwrapper?
评论 #5723748 未加载
评论 #5723339 未加载
评论 #5723429 未加载
评论 #5724627 未加载
评论 #5724306 未加载
评论 #5723483 未加载
评论 #5723340 未加载
sepethabout 12 years ago
As a long time bash user, I thought I can give a chance to fish. But after 30m later, when I see this [1] I went back to bash.<p>[1] <a href="http://serverfault.com/questions/164305/how-can-i-set-environment-variable-for-just-one-command-in-fish-shell" rel="nofollow">http://serverfault.com/questions/164305/how-can-i-set-enviro...</a>
评论 #5724285 未加载
评论 #5724823 未加载
评论 #5724346 未加载
AlexMaxabout 12 years ago
I used fishshell for the better part of a year and enjoyed the experience. However, a few things bugged me:<p>- Anything that shells out using your default shell seems to assume a bourne-compatible shell. I remember this biting me when using various emacs commands that assumed all the world is a bourne shell.<p>- Copypasting commands is annoying too, but I've been evaluating zsh for the past few months and i've been bitten there too...seems like anything that isn't bash will run into that issue, and you can always just use bash for those instances.<p>- Virtualenv comes with a fish shell script, but last I checked it didn't actually work.<p>- Does fish still throw a hissy fit every time you try and tab-complete a command and your $PATH has a non-existant path in it?
joem86about 12 years ago
I would severely miss the history completion. I can't count how many times I type !vi to return to the last file I was editing while goofing around in between editing sessions, or !scp to re-upload a fixed package. I understand the need for simplicity, but hitting the up arrow an undefined number of times until I see the command I need seems less efficient.<p>Other than that fish looks really polished and I plan on devoting a few days to it to give it a fair shake.
评论 #5726741 未加载
olalondeabout 12 years ago
Somewhat tangential but is there any reason why the IRC chatroom is on OFTC rather than Freenode? I think it's the first time I see an open source project using OFTC.
评论 #5726340 未加载
评论 #5724578 未加载
评论 #5724570 未加载
Osirisabout 12 years ago
I just found out the other day that in fish you don't need to use the 'cd' command. You can just type out a path and it'll change to the folder.
评论 #5726624 未加载
vtempestabout 12 years ago
Interesting idea with potential, but poor implementation. I tried to type sudo apt-get and it didn't even autofill my most used commands. I also use the guake shell client, I would want it integrated in that
评论 #5723816 未加载
评论 #5726148 未加载
评论 #5723568 未加载
评论 #5723559 未加载
moystardabout 12 years ago
Like many, I have switched to zsh a few months back and have enjoyed the experience thanks to Oh-My-Zsh. I will give it a go, but I don't know if I can really appreciate the difference.
评论 #5723534 未加载
hebz0rlabout 12 years ago
I wonder if keychain now works with fish (didn't with the last version) or is there an alternative to get fish working with the ssh-agent?
评论 #5724842 未加载
rob22about 12 years ago
Its Very Nice shell &#38; better than bash...
评论 #5723831 未加载
danbmil99about 12 years ago
fish awesome