Hi, Kevin, On Sat, 13 Mar 2021, Kevin Locke wrote: > > I've attached a patch to fix the issue by requiring complete to follow a > line break or semicolon. It obviously does not address the root of the > problem of reliably differentiating a list of paths from a Bash script. > (Which is not really possible, since a list of paths is a valid bash > script.) But it may be a sufficient quick fix until/unless #785271 is > addressed.
I'm not sure we will ever be able to correctly detect everything... Anyhow, your patch looks not only sufficient, but correct on its own. I'll check if it works correctly with the scripts currently installed under my /usr/share/bash-completion. Also, the detection algorithm has been kindly written by sergiodj (CC), so I'll give him some time to weigh in, then I'll apply your fix. > Thanks for considering, Thank you! Cheers, Gabriel