I'm trying to write a bash completion function that works for strings containing spaces and punctuation, even quotes may be in there.
I extract these strings with sed
from files and thus have them as a several lines of text where each one contains a target string for completion. However, all the ways I tried to pass this to compgen -W
, I always get completion for the individual words only.