Saturday, March 20, 2010

Using alt (meta) in bash on OS X

The bash shell has a few very useful commands that, at first glance, do not work on OS X. Commands like Alt-D (delete word) and Alt-B (backwards one word) does not work. This has annoyed me for a while, so I finally set out to do something about it. The solution turned out to be fairly simple.

Terminal.app has a setting that turns the option key as the meta key. Just open Terminal.app preferences and select the settings tab, and select "use option as meta" check box. You are now good to go for using the Alt-B, Alt-D (and similar) keyboard shortcuts.

1 comments:

Fredrik said...

But then you´re stuck without []|~ and lots of other usefull keys wich require the alt-key. Very frustrating.