On my Ubuntu machine, I can do this
emacs $(which first-part-of-executable<tab>
and bash will tab-complete the full executable name. I enabled this myself by adding
complete -c which
to my .bashrc
, because I only want which
to complete with executable names.
For some reason, on my RHEL5 machine, the tab completion works for which
within the $(
, but then moves back to filename completion for the executable.
How can I make bash complete which
within parentheses?