Pressing <tab> after typing 'export VARIABLE = ~ /' compresses 'VARIABLE ='
I am experiencing the following behavior in bash, which I find very annoying:
- A type
export VARIABLE=~/
- Now I would like to autocomplete for the next segment of the path, so I click
<tab>
. - Bash clobbers
VARIABLE=
, leaving onlyexport ~/
.
Why is this happening?
My bash version is 4.3.33, OS is Debian testing, terminal is Konsole.
source to share
Make sure it $COMP_WORDBREAKS
contains =
. If not, try this:
COMP_WORDBREAKS+==
If export
your satisfaction is satisfied after the completion of the work , you need to find out which startup file is changing COMP_WORDBREAKS
.
For example, if you installed node.js, completing the npm
script (in will /etc/bash_completions.d/npm
remove =
and @
from COMP_WORDBREAKS.
Many completion scripts, somewhat annoyingly, change global settings. (For example, standard Debian / Ubuntu shutdown scripts allow a shell option extglob
.)
source to share