A fantastic way to save typing, I find that this is also a huge timesaver when learning new commands. I’ll freely admit that I’ve become a little dependent.
On DICE: ensure you have the latest
bash-completion-*.inf package installed (most do). Then, simply add the following to your
[[ -e /etc/bash_completion ]] && . /etc/bash_completion
Once you’ve sourced the script (manually, or by restarting a shell), simply press tab at all the usual opportune moments to activate the extended completions.
I have augmented the already impressive list of completed commands with the following:
- The alpine mailer
- OpenAFS utils:
lpr(for LPRng; CUPS support pending.)
om(yes, even remotely, but you have to wait for it!)
rfe(to a point, it completes map names, –options and profile names (slowly))
It’s also pretty simple to write completion scripts… but that’s something for another time. That said, the source for this package can be found in the
bashcompletion subversion repository, and fixes and contributions are of course welcome.
Update, April 2012: sources now managed as part of the DICE source repository. Look for