Reputation: 12692
I just want the first argument to a function of mine to auto-complete with all possible executables.
This is what I added to my .bash_aliases
function viwhich() { vi `which $1` ; }
But now the executables don't auto complete anymore, e.g. TAB isn't working.
Is there a quick fix?
Upvotes: 0
Views: 76
Reputation: 12692
Found it
function viwhich() { vi `which $1` ; }
complete -c command viwhich
Nice
Upvotes: 2