I'm experiencing the following behaviour in bash that I find very annoying:
- Type
export VARIABLE=~/
- Now I'd like auto-completion for the next segment of the path, so I press
<tab>
. - Bash clobbers the
VARIABLE=
, leaving justexport ~/
.
Why is this happening?
My bash version is 4.3.33, OS is Debian testing, terminal is Konsole.
Verify that
$COMP_WORDBREAKS
includes an=
. If not, try this:If the
export
completion works to your satisfaction after that, then you need to figure out what startup file is changingCOMP_WORDBREAKS
.For example, if you've installed node.js, the
npm
completion script (in/etc/bash_completions.d/npm
removes=
and@
from COMP_WORDBREAKS.Many completion scripts, somewhat annoyingly, change global settings. (For example, the standard Debian/Ubuntu completion scripts enable the
extglob
shell option.)