Enhance the power of Bash

Jul 18, '02 08:01:19AM

Contributed by: mule

Many might not know this, but since version 2.04, Bash offers us a very powerful way to program certain command line completions.

The bash completions scripts (see downloads in the middle of the page) offer an already rather advanced set. Those completions work flawlessly under Mac OS X; you simply need to follow the provided instructions and you are up.

You need an example? Well, then imagine typing ssh [TAB] and seeing all the IP addresses from your known_hosts file. But this is only one example; completion offers hundreds of possibilities to make your life on the CLI easier. Once installed, you can obtain a complete listing of all commands that have associated completions with complete -p.

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=200207180801191