[Pkg-javascript-devel] Bug#711810: npm: bash completion script clobbers $COMP_WORDBREAKS
Jonathan Nieder
jrnieder at gmail.com
Mon Jun 10 00:36:54 UTC 2013
Package: npm
Version: 1.1.4~dfsg-2
Severity: important
Tags: upstream
While investigating another bug related to $COMP_WORDBREAKS, I noticed
the following:
$ echo $COMP_WORDBREAKS
"'@><=;|&(:
$ . /etc/bash_completion
$ echo $COMP_WORDBREAKS
"'><;|&(:
That's due to the following code from /etc/bash_completion.d/npm:
COMP_WORDBREAKS=${COMP_WORDBREAKS/=/}
COMP_WORDBREAKS=${COMP_WORDBREAKS/@/}
export COMP_WORDBREAKS
I assume the intent is to change how wordbreaking works in the npm
completion script (so that e.g. "npm ls =isaa" can complete to "npm ls
=isaacs"). See the definition of "__get_comp_words_by_ref -n @=" in
/etc/bash_completion for a better way to do that, which doesn't
clobber state used by other completion scripts.
Thanks and hope that helps,
Jonathan
More information about the Pkg-javascript-devel
mailing list