Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Problem with Bash Completion

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
fctk
Veteran
Veteran
Posts: 1424
Joined: Wed Jan 28, 2004 8:08 pm
Location: Milan, Italy, EU

Problem with Bash Completion

  • Quote

Post by fctk » Thu May 18, 2006 7:14 pm

Hello,

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:

Code: Select all

eselect bashcomp enable gentoo

Code: Select all

bash-completion-config --install gentoo
and then I issue:

Code: Select all

source ~/.bashrc
changes takes effect immediately, but if I disable some "module" instead, with one of the two following commands:

Code: Select all

eselect bashcomp disable gentoo

Code: Select all

bash-completion-config --uninstall gentoo
and then I issue:

Code: Select all

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:

Code: Select all

[[ -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:

Code: Select all

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.
Top
Earthwings
Bodhisattva
Bodhisattva
User avatar
Posts: 7753
Joined: Mon Apr 14, 2003 8:13 pm
Location: Germany

  • Quote

Post by Earthwings » Thu May 18, 2006 7:35 pm

Juest a wild guess: Installing functions probably means defining them in some file that is read when .bashrc is sourced. Removing them means removing them from that file. Therefore they are available when you source .bashrc after "installing" them. To get rid of them however, you'd have to remove the corresponding lines *and* unset the functions. I don't know if that's possible, and if it is, whether the added complexity is really needed.

Edit: Btw the interesting functions are in the first lines of ~/.bashrc, i.e. the contents of that file/dir listed there.
KDE
Top
Post Reply

2 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic