On Sun, Dec 3, 2023 at 1:08 PM Oliver Kiddle wrote: > > It definitely would be best renamed with _ant_ as a prefix. I would just > call it _ant_targets and include the compadd line in the function. That last is a little tricky because it calls itself recursively. > Perhaps whoever wrote it wanted to use it outside of completion. Heh. > It could also be rewritten to use fewer subshells. I'm not certain enough of what's going on in there to try to do that. One subshell is just to protect the parent against a "cd", the others probably tail-exec themselves except for the one that has an "echo $file | sed". Rewritten to avoid "sed" you mean? The s/// are mostly pretty gnarly.