Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133765 - problem at disabling a module in bash-completion
Summary: problem at disabling a module in bash-completion
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Lowest trivial
Assignee: Mike Kelly (RETIRED)
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-19 04:02 UTC by fctk86
Modified: 2007-01-11 08:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fctk86 2006-05-19 04:02:50 UTC
I have a little problem with bash completion.

It works pretty well except for one thing; if I enable some "module" with one of the two following commands:
eselect bashcomp enable gentoo
bash-completion-config --install gentoo

and then I issue:
source ~/.bashrc

changes takes effect immediately, but if I disable some "module" instead, with one of the two following commands:
eselect bashcomp disable gentoo
bash-completion-config --uninstall gentoo

and then I issue:
source ~/.bashrc

changes doesn't take effect, and I have to logout and login again.

Is there a better command for changes to take effect immediately or perhaps it is a bug?

Some details:

app-shells/bash-3.1_p16
app-shells/bash-completion-20060301
app-shells/gentoo-bashcomp-20050516
app-admin/eselect-1.0
app-shells/bash-completion-config-0.8-r2

This is ~/.bashrc:
[[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion

[[ -f /etc/bashrc ]] && source /etc/bashrc

alias halt='shutdown -h now'
alias reboot='shutdown -r now'

alias eprogress='watch -n 5 --no-title eprogress'
alias esync='emerge --sync && gensync bmg-main && gensync gentoo-de && zugaina-w
ebrsync && update-eix'

alias emake='nano -w /etc/make.conf'
alias eworld='nano -w /var/lib/portage/world'
alias exorg='nano -w /etc/X11/xorg.conf'
alias egrub='nano -w /boot/grub/grub.conf'
alias emodules='nano -w /etc/modules.autoload.d/kernel-2.6'

alias mkernel='make && make modules_install'


This is /etc/bashrc:
alias rm='rm -i'
alias du='du -sh'
alias man='man -P /usr/bin/most'
alias formatfloppy='fdformat /dev/floppy/0 && mkfs.msdos -v /dev/floppy/0'
alias beep='beep -l 2000'
alias pingtest='ping -a -c 5 www.google.it'
alias ls='ls --color=tty'

extract() {
  if [ -f "$1" ] ; then
    case "$1" in
      *.tar.bz2) tar xjf "$1"                               ;;
      *.tbz2)    tar xjf "$1"                               ;;
      *.tar.gz)  tar xzf "$1"                               ;;
      *.tgz)     tar xzf "$1"                               ;;
      *.tar)     tar xf "$1"                                ;;
      *.bz2)     bunzip2 "$1"                               ;;
      *.gz)      gunzip "$1"                                ;;
      *.rar)     rar x "$1"                                 ;;
      *.zip)     unzip "$1"                                 ;;
      *.tar.7z)  7za x -so "$1" | tar xf -                  ;;
      *.7z)      7za x "$1"                                 ;;
      *.ace)     unace x "$1"                               ;;
      *)         echo "$1 cannot be extracted via extract"  ;;
    esac
  else
    echo "$1 is not a regular file"
  fi
}


Thanks.

# emerge --info
Portage 2.1_pre7-r5 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.5-r3, 2.6.15-suspend2-r4 i686)
=================================================================
System uname: 2.6.15-suspend2-r4 i686 AMD Sempron(tm)  2200+
Gentoo Base System version 1.6.14
ccache version 2.3 [disabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer nodoc noinfo sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo http://gentoo.mirror.solnet.ch "
LC_ALL="it_IT.UTF-8"
LINGUAS="it"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main /usr/local/gentoo-de /usr/local/zugaina-portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext alsa bash-completion cjk minimal mmx mmxext nls nptl nptlonly nvidia sse unicode elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_it userland_GNU video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS
Comment 1 Mike Kelly (RETIRED) gentoo-dev 2007-01-11 08:10:43 UTC
This is due to the way that completion functions and file sourcing are handled in bash. I really can't think of any way around this. Sorry :\.

Only thing I can tell you is to run:

 unset _scriptname

where scriptname is the script you just removed with eselect bashcomp. But, that isn't how all the completion functions are named, so there isn't really a 100% reliable way to do this, so it can't be automated in, say, eselect bashcomp.