Possible Duplicate:
How do I get bash completion for command aliases?
I wrote a series of scripts to make package management a little more intuitive for me. However, I can no longer tab complete for package names. Is there a way I can forward the results of a tab completion to a script?
Sample- package-install:
#!/bin/bash
apt-get install $*
apt-get install "$@"
.$*
breaks the arguments into words, interprets them as wildcard patterns, then stitches the pieces back together. This may produce nonsensical results if the arguments contain whitespace or wildcard characters."$@"
replicates the script's arguments exactly. – Gilles 'SO- stop being evil' Nov 27 '12 at 23:34alias package-install='apt-get install'
(put this line in your~/.bashrc
). The solution for completing is the same whether you have a wrapper script or an alias. – Gilles 'SO- stop being evil' Nov 28 '12 at 00:18