(previously posted on comp.unix.shell, to no avail. I hope the question is clear)
I have a function called 'a' that has command completion associated with it. This works. I would like it to complete as well within command substitution, so that 'prompt> cp zut $(a foob<TAB>)' will complete to foobar in the same way as 'prompt> a foob<TAB>' completes to foobar. So far I have no luck in researching this, possibly because the search terms I can think of (basically the subject) are not very specific within bash's universe of completion and substitution wonderfulnes. I've noted that completion works for regular commands such as ls within command substitution. Is what I want possible, and if so how? Stijn