🐟 Fish rocks. I've been using it exclusively for the last year, and I can't imagine giving it up.
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 sh compatible, but adding set shell=sh 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: https://github.com/adambrenecki/virtualfish
Want to run a bash script? Just run bash fooshnizzle.sh. Want to switch to bash for a moment? Run bash and then exit when you want to switch back to fish. This POSIX-compatibility topic is, in my opinion, much ado about nothing.
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 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: https://github.com/justinmayer/dotfiles/tree/master/fish
Fish is fast, the auto-completion is amazingly helpful, and it's intuitive to use without too much configuration. Give it a try. 🐟
I just wish it didn't insist on doing everything differently. For example, PATH is traditionally delimited with colons in just about every shell; fish uses spaces. This instantly breaks compatibility with legacy environment configuration, and for no particularly good reason that I can see.
I was excited to try fish, but I found it impossible to get configured in an established environment with entrenched bash usage (which zsh, by the way, has no problem with)
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 - https://github.com/bpinto/oh-my-fish
Agreed. I've been using fish now as my default shell, it took a bit of time to get used to but it's definitely been worth the time porting my zsh functions/aliases over to fish and adding inline documentation.
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.
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.
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.
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..
I'm guessing that people who cared about the terminal, and CLI in general, moved to other OSes a long time ago. And it's not just a glib answer, that's actually why I first gave Linux a real shot as my main system -- to replace Putty with a pretty, transparent terminal window and have all the GNU tools that go with it.
I can recommend console2+powershell. Powershell is basically bash but with object pipes instead of character pipes. It's all built on top of dotnet, so if you're familiar with c# you should feel at home with the API.
to kill all instances of internet explorer. The `ps` command outputs System.IO.Process objects. The ? { ... } syntax is a filter, inside which you can use $_ to refer to the element you're matching. You can access the 'Name' property directly and use -match to match it against an expression. Finally the % { ... } syntax executes some code on every element, in this case it calls System.IO.Process.Kill() to kill the process.
Console2 puts a nice face on things and supports tabbing and resizing, as you would expect from a usable terminal window.
What's wrong with cygwin (just curious what you dislike about it)? It's fine if you're just trying to do linux based stuff on Windows. It's much more complicated if you are trying to work with the Windows subsystem though. If that is your complaint, I would generally agree, but trying to integrate POSIX on the Windows object like model is not an easy task and what Powershell was made to try to do instead (as best it could since Linux is configured by text files mostly and Windows is Objects). Here's a great comment[1] by one of the developers of Powershell explaining why it is the way it is.
If you dislike using it directly through cmd.exe due to the abysmal UI (as I do), there's alternatives that let you use it with putty[2] and leave cmd.exe interface all together.
It's a little complicated, it's also possible to use iPython, an enhanced Python interpreter, as a shell quasi-replacement on Windows. (It's even more powerful in combination with PowerShell.) Features:
It has tab autocompletion. You can send commands directly to the underlying system shell with '!' (e.g., !dir) and save the result in a Python variable for manipulation (a = !dir). It has special commands called "magics" that let you do neat stuff that the standard shell doesn't, like time how long things take to run. It has a robust command history.
What this means is you can write Python code as your shell scripting language.
The more interesting question is why doesn't 'nix have Powershell and a layer of abstraction upon which it can sit equivalent to the CLR?
Perhaps to be files all the way up is a limitation of the bazaar - at least until one hits the JVM, hopefully. There's no contract assuring that level of abstraction between the user and the turtles. And agreement that such a layer of abstraction is a good thing is unlikely to be forthcoming.
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.
I've tried fish a few years ago and wasn't all that impressed with the features.
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.
I'll give fish a go as my main shell. Let's see were this goes.
I've "skipped" zsh--I tried it a few times, but it didn't seem enough better than bash for it to be worth learning, converting all my scripts, and so on. fish does seem worth the effort, and in fact many of my bash scripts and configuration settings are now unnecessary.
If you're just jumping off bash and don't have a long .zshrc with aliases (which might make the migration a bit painful), then without a doubt try fish!
My situation exactly oneandoneis2! I've used Bash for 12 years, tried zsh for the last few months and not really noticed the difference tbh. Will see if fish gives me an 'aha' moment
Out of the box, no. I've since switch to rbenv, which I actually like much better, and https://github.com/adambrenecki/virtualfish is a very nice port of virtualenvwrapper to fish.
I have both RVM and Venvwrapper setup in zsh. After installing fish everything worked right out of the box - without making any changes to the config files.
I used fishshell for the better part of a year and enjoyed the experience. However, a few things bugged me:
- 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.
- 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.
- Virtualenv comes with a fish shell script, but last I checked it didn't actually work.
- 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?
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.
Other than that fish looks really polished and I plan on devoting a few days to it to give it a fair shake.
One of the nice features of autosuggestions is that they remember which arguments were files, and which ones were not. So if you have changed directories, !vi will edit a file that does not exist - probably not what you meant to do. The fish autosuggestion won't suggest it at all.
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.
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
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.
[+] [-] SnowLprd|13 years ago|reply
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 sh compatible, but adding set shell=sh 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: https://github.com/adambrenecki/virtualfish
Want to run a bash script? Just run bash fooshnizzle.sh. Want to switch to bash for a moment? Run bash and then exit when you want to switch back to fish. This POSIX-compatibility topic is, in my opinion, much ado about nothing.
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 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: https://github.com/justinmayer/dotfiles/tree/master/fish
Fish is fast, the auto-completion is amazingly helpful, and it's intuitive to use without too much configuration. Give it a try. 🐟
[+] [-] sliverstorm|13 years ago|reply
I was excited to try fish, but I found it impossible to get configured in an established environment with entrenched bash usage (which zsh, by the way, has no problem with)
[+] [-] mixmastamyk|13 years ago|reply
[+] [-] jlgreco|13 years ago|reply
Why not just
? In zsh I never worry about running bash scripts because they run by the kernel with the shell/interpreter specified after the hashbag.[+] [-] Paul_D_Santana|13 years ago|reply
Where did you get that fish? And are there more animal characters?
I'm surprised I can copy it into other apps and it doesn't bug out.
🐟
[+] [-] krat0sprakhar|13 years ago|reply
[0] - https://github.com/clvv/fasd
[+] [-] orta|13 years ago|reply
Very cool.
[+] [-] easytiger|13 years ago|reply
$ time zsh -c "echo foo" foo
real 0m0.005s user 0m0.002s
[+] [-] liotier|13 years ago|reply
[+] [-] c-oreills|13 years ago|reply
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.
[0] https://wiki.archlinux.org/index.php/Fish#Troubleshooting
[+] [-] barrkel|13 years ago|reply
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.
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.
[+] [-] acron0|13 years ago|reply
[+] [-] spindritf|13 years ago|reply
[+] [-] inoop|13 years ago|reply
You can do stuff like
to kill all instances of internet explorer. The `ps` command outputs System.IO.Process objects. The ? { ... } syntax is a filter, inside which you can use $_ to refer to the element you're matching. You can access the 'Name' property directly and use -match to match it against an expression. Finally the % { ... } syntax executes some code on every element, in this case it calls System.IO.Process.Kill() to kill the process.Console2 puts a nice face on things and supports tabbing and resizing, as you would expect from a usable terminal window.
[+] [-] bliker|13 years ago|reply
- msys-git (I have ls, rm -rf... all unix goodness)
- clink (better tab completion, history, all around good stuff)
- console2 (styling)
- ansicolor (colored prompt)
and also I got some usefull aliases. If you are interested I can write down some steps for other people to follow.
screenshot http://i.imgur.com/hATwCVI.png
[+] [-] mjs|13 years ago|reply
http://en.wikipedia.org/wiki/Windows_PowerShell
It's actually got some quite interesting concepts, and is extremely consistent. These tips also convey the approach and how it works:
http://technet.microsoft.com/en-us/library/ee692948.aspx
[+] [-] yareally|13 years ago|reply
If you dislike using it directly through cmd.exe due to the abysmal UI (as I do), there's alternatives that let you use it with putty[2] and leave cmd.exe interface all together.
[1] http://stackoverflow.com/questions/573623/powershell-vs-unix...
[2] http://www.9bis.net/kitty/?page=PuTTYCyg
[+] [-] mutewinter|13 years ago|reply
[1]: http://www.hanselman.com/blog/Console2ABetterWindowsCommandP...
[2]: https://code.google.com/p/mintty/
[+] [-] gecko|13 years ago|reply
[+] [-] shocks|13 years ago|reply
1: https://code.google.com/p/clink/
[+] [-] dcre|13 years ago|reply
It has tab autocompletion. You can send commands directly to the underlying system shell with '!' (e.g., !dir) and save the result in a Python variable for manipulation (a = !dir). It has special commands called "magics" that let you do neat stuff that the standard shell doesn't, like time how long things take to run. It has a robust command history.
What this means is you can write Python code as your shell scripting language.
[+] [-] mariusmg|13 years ago|reply
http://code.google.com/p/conemu-maximus5/
[+] [-] brudgers|13 years ago|reply
Perhaps to be files all the way up is a limitation of the bazaar - at least until one hits the JVM, hopefully. There's no contract assuring that level of abstraction between the user and the turtles. And agreement that such a layer of abstraction is a good thing is unlikely to be forthcoming.
[+] [-] zokier|13 years ago|reply
[+] [-] unknown|13 years ago|reply
[deleted]
[+] [-] danbmil99|13 years ago|reply
[+] [-] digisign|13 years ago|reply
[+] [-] leejoramo|13 years ago|reply
[+] [-] adito|13 years ago|reply
Really, this 100x better than bash.
[0]: http://fishshell.com/#platform_tabs[1]: http://fishshell.com/tutorial.html
[+] [-] netmute|13 years ago|reply
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.
I'll give fish a go as my main shell. Let's see were this goes.
[+] [-] izietto|13 years ago|reply
[+] [-] gdonelli|13 years ago|reply
[+] [-] oneandoneis2|13 years ago|reply
Which to go for..?
[+] [-] mjs|13 years ago|reply
FWIW my (rapidly changing) fish configuration:
https://github.com/ithinkihaveacat/dotfiles/tree/master/fish
[+] [-] unknown|13 years ago|reply
[deleted]
[+] [-] krat0sprakhar|13 years ago|reply
[+] [-] mathrawka|13 years ago|reply
[+] [-] porker|13 years ago|reply
[+] [-] andy_boot|13 years ago|reply
[+] [-] zackkitzmiller|13 years ago|reply
[+] [-] krat0sprakhar|13 years ago|reply
[+] [-] sepeth|13 years ago|reply
[1] http://serverfault.com/questions/164305/how-can-i-set-enviro...
[+] [-] AlexMax|13 years ago|reply
- 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.
- 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.
- Virtualenv comes with a fish shell script, but last I checked it didn't actually work.
- 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?
[+] [-] joem86|13 years ago|reply
Other than that fish looks really polished and I plan on devoting a few days to it to give it a fair shake.
[+] [-] ridiculous_fish|13 years ago|reply
One of the nice features of autosuggestions is that they remember which arguments were files, and which ones were not. So if you have changed directories, !vi will edit a file that does not exist - probably not what you meant to do. The fish autosuggestion won't suggest it at all.
[+] [-] olalonde|13 years ago|reply
[+] [-] Osiris|13 years ago|reply
[+] [-] vtempest|13 years ago|reply
[+] [-] unknown|13 years ago|reply
[deleted]
[+] [-] moystard|13 years ago|reply