Fish shell 2.2
fishshell.com
fishshell.com
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`.
What I meant in my comment above is a lot of 'download an install' instructions in tutorials, and sometimes installation wizards for programs are written for bash, and can't be run without modification in Fish. Not a major setback, but for a Bash user it would just work.
Admittedly for the description given, it does sound like CDPATH would work. But I'm going to assume there's a reason, and functions that change the current working directory are the perfect example of functions that can not be run in a subshell, so will have to be rewritten to fish, which is what the author was providing.
$ export cdc_stuff='/Users/me/src/project_stuff'
$ cd $cdc_stuff
however, now it's clear.in the event you're looking for alternatives, perhaps porting your code to (e.g.) ruby could work.
just in case, here's the isbn number of a book called, 'Build Awesome Command-Line Applications in Ruby 2,' from the pragmatic bookshelf: 978-1-93778-575-8
https://github.com/rupa/z (bash, zsh)
https://github.com/sjl/z-fish0: https://github.com/huyng/bashmarks 1: https://github.com/techwizrd/fishmarks
It'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.
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. ;)
Lots of people target bash without knowing that some of its non-posix features are not compatible across even minor versions.
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.
$ 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.Some people do find the web interface useful, otherwise it wouldn't be there. On the other hand, you are not providing any reasons why a web server is harmful, why would anybody listen to you as the voice of reason, if your axiom is "a shell should not have a web server in its codebase, period"?
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.