When I create a command that wraps an existing command with some sugar, I'd like the new command to support the autocompletion of the original command. Is there a way to tell Bash to reuse the autocompletion script of another command?
Silly example:
cat > ~/ls-on-steroids.sh <<EOF
echo "Here are some goodies!"
ls "$@"
EOF
chmod +x ~/ls-on-steroids.sh
Now, how do I configure my new script such that when I type:
~/ls-on-steroids.sh <TAB><TAB>
I'd like the same behavior as with:
ls <TAB><TAB>
Preferably in a portable, repeatable manner, without having to manually track down the location of ls's autocomplete script.