I have a program foo for which I've written a bash-completion script, and that all works fine. I have dozens of wrapper-scripts bar1, bar2 ... which just sets one of the command-line options
#/usr/bin/env bash exec foo --some-option some-value "$@" and I was rather hoping that the completions for foo would be in operation for the wrapper scripts, but it seems not. I can generate the completion scripts for each of the wrappers of course, but that seems inelegant and wasteful. Is there some trick available to get the completion to be available in the wrappers?
bar1, see that it callsfoo, so it should automatically inherit the same completions? That's asking quite a bit.bar1, it doesn't even know that's a script -- script execution is handled by the OS, not the interactive shell.