154 points · by siteshwar · 11y ago · 70 comments
Coming from BASH this shell feels like a much-needed update! Instead of worrying to make sure my terminal has all of these feature and then having a different experience in each terminal app - now All of the features are in shell not the terminal and I can connect anywhere, from any device, and enjoy the same setup.
The only two downsides are actually the same downside: its not compatible with BASH's shell scripting, which means you often cant just run shell scripts written by others, you may have to reformat it a little first. Same if true for how you format aliases and a few other shell-related stuff you put in your options file. It will still all work, but unless it's been ported to Fish's syntax it may need to be updated or rewritten.
This means that all of my scripted automation I have done is Fish-specific for now and wont run in regular BASH.
What exactly do you mean by “Shell scripts”? If the script contains a proper Shebang you can easily run it via `./script.sh`. If not you use: `bash ./script.sh`.
0: https://github.com/huyng/bashmarks 1: https://github.com/techwizrd/fishmarks
https://github.com/rupa/z (bash, zsh)
https://github.com/sjl/z-fishIt's fantastic, I urge everyone to give it a try. Pretty much the only valid complaint I see here is from people who have bash code that needs to be sourced to run. I definitely think that it's worth rewriting some code to switch to a much superior shell, though.
If I need to source, a quick "bash<enter>" drops me back to bash. This is good enough for me.
Install oh-my-zsh, and enable I couple plugins. Here's what I have in my config: plugins=(git history-substring-search zsh-syntax-highlighting docker sudo)
In terms of 'enjoying the same setup on all devices', I use dropbox (or owncloud), to sync my config. All I have to do is add this at the bottom of my .zshrc file: source ~/Dropbox/global.zshrc
My last tip about directory jumping, for keedot, is there are methods that will do this for you. I use fasd (https://github.com/clvv/fasd) which you can add to your shell and will remember the directories you use often so you dont have to make special cases for specific ones. Check out the 'z' command. It has been amazingly useful.
Lots of people target bash without knowing that some of its non-posix features are not compatible across even minor versions.
For me, there's virtualenv and rvm that both mess with shell stuff deeply enough to where running them in fish can be tricky.
virtualenv has good fish support, but never really got rvm working. I ended up going back to zsh after 2 years or so in fish because of small issues like that and realising that so long as I had reverse search I wasn't really gaining much in productivity from fish.
Obviously, virtualenv and others disagree. ;)
The up arrow expresses support for the story. The delete link allows a person to revoke comments that don't merit upvotes. The edit link lets comments to be modified with supporting details, examples, evidence and rationales that contribute to HN'ers understanding and knowledge by extending the content.
That's more constructive than complaining about downvotes and implying that people don't get it.
Once in the web interface, you can click around to implement some pre-supplied recipies to your fish configuration.
If you hit ctrl-c, the fish_config program exits and stops listening on the port.
It's something you either run or you don't.
$ fish_config
Web config started at 'file:///Users/bjorn/.cache/fish/web_config-6VIDFM.html'. Hit enter to stop.
::1 - - [12/Jul/2015 11:13:31] code 403, message Forbidden
When I kill this and refresh the config in the browser doesn't load anymore. So I don't see the problem.