Thread: bash-completion working 100%... I think!
well after half night installing latest version of git ppa. noticed git completion wasn’t working. started troubleshooting methods; google. saw post various forums solutions sourced /etc/bash_completion.d/git in ~/bashrc. tried , worked. in process of looked through directory of /etc/bash_completion.d/ , there around 150 or files various programs, of i’m sure aren’t installed on box. out of curiosity chose random file dir , enter command in terminal followed [tab] [tab] see if auto completion work. surprise didn’t work. chose command dpkg; [tab] [tab] auto completion worked! worked, didn’t. thought of how tedious source every single file inside ~/.bashrc. began looking through ~/.bashrc... @ bottom is:
~/.bashrc before
# enable programmable completion features (you don't need enable
# this, if it's enabled in /etc/bash.bashrc , /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
after looking @ along time looked through /etc/bash_completion bunch of stuff didn’t follow. after lines, why isn’t /etc/bash_completion sourcing files in /etc/bash_completion.d/? since i’m little familiar bash scripts(very little) began looking @ ~/.bashrc again, , changed this:
~/.bashrc after
# enable programmable completion features (you don't need enable
# this, if it's enabled in /etc/bash.bashrc , /etc/profile
# sources /etc/bash.bashrc).
if [ -d /etc/bash_completion.d/ ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
saved edited ~/.bashrc, closed reopened terminal. first tried git [tab] [tab] , completion worked! tried dpkg, worked! tried rsync worked! tried few more , “all” work now. “-f” switch = if <file> exists. “-d” = if <directory> exists. , “ changed /etc/bash_completion.d/ because directory exists.
i’m not sure if bug in /etc/bash_completion or not. i’m using ubuntu 10.04(64-bit) on dell latitude d620. if else has problems auto completion of command listed in /etc/bash_completion.d/ give try have copy/paste. let me know if helped you.
-leemaster81
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] bash-completion working 100%... I think!
Ubuntu
Comments
Post a Comment