GNOME Bugzilla – Bug 523732
gvfs-bash-completion.sh should not modify COMP_WORDBREAKS
Last modified: 2009-03-09 16:20:36 UTC
COMP_WORDBREAKS is a global variable that affects all completions. This snippet COMP_WORDBREAKS=${COMP_WORDBREAKS//:} breaks currently working bash completion functions for at least scp, mount, chown. Arguably all these and gvfs should be made resilient to different values of COMP_WORDBREAKS but thats a bigger task I guess.
Is there any local way to make it not break on colon? Its kinda useless for uris without that.
I expected to find something about it in the "complete" command parameters, but I can't see it. I don't know. Its quite useless this way indeed.
The existing bash-completion completion for scp requires colon in COMP_WORDBREAKS to work properly but still is sensitive to the text coming before the colon. Perhaps the gvfs completion could use a similar technique?
Regardless of whether each command specific completion function is ready to deal with various values of COMP_WORDBREAKS, gvfs-completion.sh is clearly not the place to modify that global variable. So while no one steps up to fix the gvfs specific completion function, everything else has been broken by this for almost a year now. I hope you see the problem there.
2009-03-09 Alexander Larsson <alexl@redhat.com> Bug 523732 – gvfs-bash-completion.sh should not modify COMP_WORDBREAKS * programs/gvfs-bash-completion.sh: Don't override COMP_WORDBREAKS, instead workaround the colon problem