Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This question already has an answer here:

I want to make tab completion to complete on specific programs in path although there maybe other possible completion in path.

For example, if I type mpl and tab, it should complete to mplayer though there might be other programs in the path starting with mpl. I know of bash alias builtin for ~/.bashrc but thats not what I'm looking for.

share|improve this question

marked as duplicate by slm, jasonwryan, paraxor, Anthon, rahmu Jul 21 '13 at 12:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

If you've installed the bash-completion package it includes everything you need in the way of examples. I'd look through any of the included files as examples. The ntpdate one is pretty basic.

$ less /etc/bash_completion.d/ntpdate
$ less /usr/share/bash-completion/ntpdate
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.