$ emerge app-<tab> $ emerge app-bash: cd: \: No such file or directory In /etc/make.conf: PORTDIR_OVERLAY=" \ /srv/gentoo/trees/bmg-main/ \ /srv/gentoo/trees/gentopia/ \ /srv/gentoo/trees/lila-artwork/ \ /srv/gentoo/trees/kernel-sources/ \ /srv/gentoo/trees/bugs.gentoo.org/ \ /srv/gentoo/trees/gst-plugins.catmur.co.uk/ \ /srv/gentoo/trees/auto-unmask/ \ /srv/gentoo/trees/capella.catmur.co.uk/ \ " Problem is the _portdir() function in /etc/bash_completion.d/gentoo: _portdir() { sed -n -e '/^PORTDIR=/ { s/^[^=]\+="\?\([^"]\+\|\S\+\).*/\1/p ; q }' \ /etc/make.{conf,globals} 2>/dev/null if [[ $1 == '-o' ]] ; then sed -n -e '/^PORTDIR_OVERLAY=/ { s/^[^=]\+="\?\([^"]\+\|\S\+\).*/\1/p ; q }' \ /etc/make.conf 2>/dev/null fi } far easier to source the file in a subshell then echo the variable: _portdir() { ( source /etc/make.globals; source /etc/make.conf echo $PORTDIR ) 2>/dev/null if [[ $1 == '-o' ]] ; then ( source /etc/make.conf; echo $PORTDIR_OVERLAY ) 2>/dev/null fi }
*** This bug has been marked as a duplicate of 100373 ***