The Fish Shell
There are things you drag around with you for ages, because they just work. In the last ten years, I have moved between three countries, but I have kept using the same shell, with the same configuration that kept getting more and more elaborate. Sun microcomputers has died years ago, but my
bashrc is still theoretically capable of configuring itself on SunOS.
A few days ago, Angel showed my a new shell: fish, aptly titled Finally, a command line shell for the 90s, the was rebooted Ridiculous Fish who already wrote a very good hex-editor for Mac OS X, HexFiend. Basically, fish is a shell that does the right thing out of the box and uses features that appeared in computer since the eighties: colour, unicode, thread. Fish is also very good a completion, it parses man pages to build its completion lists and seems to have custom files for many other Unix tools. This convinced me to try it as a replacement to
bash. I’m pretty happy with fish and I really recommend you try it out.
One nice feature I had on bash was a script that build a list of aliases out of all the Mac OS X applications, launching them with the open command. The script was something I had gotten off Mac OS X hints and transformed a bit. The script was not very smart, as it looked for Applications in a static set of directories. I wanted to see if I could rewrite the same feature for
mdfind to find all the Applications. The result is a small Python script which generates a list of fish functions, including a short description built using
To use the script, just download it from here, then run
./applications_to_fish_functions.py > ~/.config/fish/app_functions
And finally add the following lines to your
if test -f ~/.config/fish/app_functions . ~/.config/fish/app_functions end
All your Mac OS X applications will be available as commands, if arguments are passed to them, they will be opened by said application (assuming the application can handle said file), in tab-completion, the name of the application (with spaces and casing) is displayed. I will try to add further information.