[gentoo-user] Re: Bash completion problem: can anyone confirm?
Mick wrote: 2009/1/4 Nikos Chantziaras rea...@arcor.de: Mick wrote: On Sunday 04 January 2009, Graham Murray wrote: Willie Wong ww...@princeton.edu writes: Before I file a bug, I want to see if this is reproducible by others: After I boot into the console, if I type anything and then hit tab for the bash completion, it gives an error -bash: _filedir: command not found The weird thing is that if I start X and try the same in an aterm, the tab completion works as expected. I am currently on bash-completion-20081218, does anyone else have the same problem? I only saw the problem with vim, and then only for user root as a normal user it worked fine. So I disabled bash completion for vim. Check your relevant ~/.bashrc for this: ##uncomment the following to activate bash-completion: #[ -f /etc/profile.d/bash-completion ] \ source /etc/profile.d/bash-completion There's not such entry in my .bashrc. OK, you may need to enter it manually (and uncomment it). If it doesn't work for you after you log out/login, or you don't want to do it this way, you'll have to follow Kevin's suggestion for debugging all your rc scripts. Oops, I should have been more clear. Although there's no such entry in my .bashrc, and also none in /etc/skel/.bashrc, but bash completion *works* without flaw both in login shells as well as in interactive shells, I assume there doesn't need to be such entry in there.
Re: [gentoo-user] Re: Bash completion problem: can anyone confirm?
2009/1/4 Nikos Chantziaras rea...@arcor.de: Mick wrote: On Sunday 04 January 2009, Graham Murray wrote: Willie Wong ww...@princeton.edu writes: Before I file a bug, I want to see if this is reproducible by others: After I boot into the console, if I type anything and then hit tab for the bash completion, it gives an error -bash: _filedir: command not found The weird thing is that if I start X and try the same in an aterm, the tab completion works as expected. I am currently on bash-completion-20081218, does anyone else have the same problem? I only saw the problem with vim, and then only for user root as a normal user it worked fine. So I disabled bash completion for vim. Check your relevant ~/.bashrc for this: ##uncomment the following to activate bash-completion: #[ -f /etc/profile.d/bash-completion ] \ source /etc/profile.d/bash-completion There's not such entry in my .bashrc. OK, you may need to enter it manually (and uncomment it). If it doesn't work for you after you log out/login, or you don't want to do it this way, you'll have to follow Kevin's suggestion for debugging all your rc scripts. -- Regards, Mick
Re: [gentoo-user] Re: Bash completion problem: can anyone confirm?
On Mon, Jan 05, 2009 at 07:13:18PM +0200, Penguin Lover Nikos Chantziaras squawked: Oops, I should have been more clear. Although there's no such entry in my .bashrc, and also none in /etc/skel/.bashrc, but bash completion *works* without flaw both in login shells as well as in interactive shells, I assume there doesn't need to be such entry in there. Are you talking about the normal tab completion or the smart bash completion? With the latter, for example, if you type mplayer tabtab it will only list directories and files with extensions matching multimedia files. This behaviour is provided by the app-shells/bash-completion package. W -- Hospitality is making your guests feel at home even though you wish they were. Sortir en Pantoufles: up 759 days, 16:52
[gentoo-user] Re: Bash completion problem: can anyone confirm?
Willie Wong wrote: On Mon, Jan 05, 2009 at 07:13:18PM +0200, Penguin Lover Nikos Chantziaras squawked: Oops, I should have been more clear. Although there's no such entry in my .bashrc, and also none in /etc/skel/.bashrc, but bash completion *works* without flaw both in login shells as well as in interactive shells, I assume there doesn't need to be such entry in there. Are you talking about the normal tab completion or the smart bash completion? The smart one. For example typing emerge --de and hitting TAB twice shows: --debug --deep --depclean If your /etc/skel/.bashrc doesn't have an entry for bash completion but your ~/.bashrc does, then I guess it's not needed anymore but probably was needed a long time ago. AFAIK, updates won't change files in your $HOME so over time it tends to accumulate obsolete stuff.
Re: [gentoo-user] Re: Bash completion problem: can anyone confirm?
On Mon, Jan 05, 2009 at 08:20:47PM +0200, Penguin Lover Nikos Chantziaras squawked: If your /etc/skel/.bashrc doesn't have an entry for bash completion but your ~/.bashrc does, then I guess it's not needed anymore but probably was needed a long time ago. AFAIK, updates won't change files in your $HOME so over time it tends to accumulate obsolete stuff. I am curious as to how you have bash_completion working. Which version of bash_completion are you running? On my desktop which runs bash-completion-20050121-r10, I also do not have the line to source bash-completion in /etc/skel/.bashrc On my normal user console, if I do emerge --detabtab it displays --debug --deep --depclean as you said. But if I start a bash shell without the skeleton .bashrc bash --rcfile /etc/skel/.bashrc which does not source bash-completion, typing emerge --detabtab does absolutely nothing. W -- I couldn't repair your brakes, so I made your horn louder. Sortir en Pantoufles: up 759 days, 17:20
Re: [gentoo-user] Re: Bash completion problem: can anyone confirm?
Willie Wong wrote: Thanks. I'll try your suggestions this evening when I get home. On Mon, Jan 05, 2009 at 06:33:29AM -0800, Penguin Lover Kevin O'Gorman squawked: Since the problem does not appear under X, bash is not broken and you probably have a mis-configuration somehow. The rc scripts that are run are sensitive to the nature of the session. Your console login is a interactive login shell, while under X it's merely a interactive shell. You might want to track down the scripts that run in the two situations. My first guess would be that your ~/.bashrc sets up completion, but that file is not called from /etc/profile. If that's not it you have some debugging to do. I am pretty sure (though I am often wrong in these kinds of situations) that my .bash_profile sources my .bashrc, so that's probably not the problem (I'll double check of course). When I have to do something like that, I pepper all of the rc scripts with lines like [ -e /etc/conf.d/DEBUG ] echo ~$USER/.bashrc: \$-='$-'\ (modify according to what info you want and what script it's in) then touch or rm the file /etc/conf.d/DEBUG. Don't forget to include system scripts like /etc/profile and anything else mentioned in the man page (INVOCATION section). Actually, I wonder if it is /etc/profile that breaks stuff. My problem only occurs in the console/login shell, and the login shell, according to man bash, loads first /etc/profile, then ~/.bash_profile, which I've set to source ~/.bashrc. For the non-login shell (in aterm), bash only loads ~/.bashrc. And for the second case it works. So perhaps something is borken in /etc/profile? Also, since someone mentioned it in a reply: I realized that unwittingly I've only tested the behaviour using vim as the leading command. I have actually not tried other bash completions. So it may just be something in the vim module. But I am not sure. I'll test it tonight. On Mon, Jan 05, 2009 at 02:56:53PM +, Penguin Lover Mick squawked: If it doesn't work for you after you log out/login, or you don't want to do it this way, you'll have to follow Kevin's suggestion for debugging all your rc scripts. W I'm no guru bit I'd be glad to email you a copy of my files if you need them. Just let me know. If nothing else, you could diff them and see what is wrong that way. Dale :-) :-)
Re: [gentoo-user] Re: Bash completion problem: can anyone confirm?
Thanks. I'll try your suggestions this evening when I get home. On Mon, Jan 05, 2009 at 06:33:29AM -0800, Penguin Lover Kevin O'Gorman squawked: Since the problem does not appear under X, bash is not broken and you probably have a mis-configuration somehow. The rc scripts that are run are sensitive to the nature of the session. Your console login is a interactive login shell, while under X it's merely a interactive shell. You might want to track down the scripts that run in the two situations. My first guess would be that your ~/.bashrc sets up completion, but that file is not called from /etc/profile. If that's not it you have some debugging to do. I am pretty sure (though I am often wrong in these kinds of situations) that my .bash_profile sources my .bashrc, so that's probably not the problem (I'll double check of course). When I have to do something like that, I pepper all of the rc scripts with lines like [ -e /etc/conf.d/DEBUG ] echo ~$USER/.bashrc: \$-='$-'\ (modify according to what info you want and what script it's in) then touch or rm the file /etc/conf.d/DEBUG. Don't forget to include system scripts like /etc/profile and anything else mentioned in the man page (INVOCATION section). Actually, I wonder if it is /etc/profile that breaks stuff. My problem only occurs in the console/login shell, and the login shell, according to man bash, loads first /etc/profile, then ~/.bash_profile, which I've set to source ~/.bashrc. For the non-login shell (in aterm), bash only loads ~/.bashrc. And for the second case it works. So perhaps something is borken in /etc/profile? Also, since someone mentioned it in a reply: I realized that unwittingly I've only tested the behaviour using vim as the leading command. I have actually not tried other bash completions. So it may just be something in the vim module. But I am not sure. I'll test it tonight. On Mon, Jan 05, 2009 at 02:56:53PM +, Penguin Lover Mick squawked: If it doesn't work for you after you log out/login, or you don't want to do it this way, you'll have to follow Kevin's suggestion for debugging all your rc scripts. W -- Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun. Sortir en Pantoufles: up 759 days, 14:35
[gentoo-user] Re: Bash completion problem: can anyone confirm?
Willie Wong wrote: On Mon, Jan 05, 2009 at 08:20:47PM +0200, Penguin Lover Nikos Chantziaras squawked: If your /etc/skel/.bashrc doesn't have an entry for bash completion but your ~/.bashrc does, then I guess it's not needed anymore but probably was needed a long time ago. AFAIK, updates won't change files in your $HOME so over time it tends to accumulate obsolete stuff. I am curious as to how you have bash_completion working. Which version of bash_completion are you running? OK, strike that, I'm an idiot ;P I have this in /etc/bash/bashrc: [[ -f /etc/profile.d/bash-completion ]] source /etc/profile.d/bash-completion I must have put this in there myself, although I don't remember doing it :P Probably to have bash completion working with all users, not just me.
Re: [gentoo-user] Re: Bash completion problem: can anyone confirm?
On Sun, Jan 4, 2009 at 3:23 PM, Nikos Chantziaras rea...@arcor.de wrote: Mick wrote: On Sunday 04 January 2009, Graham Murray wrote: Willie Wong ww...@princeton.edu writes: Before I file a bug, I want to see if this is reproducible by others: After I boot into the console, if I type anything and then hit tab for the bash completion, it gives an error -bash: _filedir: command not found The weird thing is that if I start X and try the same in an aterm, the tab completion works as expected. I am currently on bash-completion-20081218, does anyone else have the same problem? I only saw the problem with vim, and then only for user root as a normal user it worked fine. So I disabled bash completion for vim. Check your relevant ~/.bashrc for this: ##uncomment the following to activate bash-completion: #[ -f /etc/profile.d/bash-completion ] \ source /etc/profile.d/bash-completion There's not such entry in my .bashrc. Since the problem does not appear under X, bash is not broken and you probably have a mis-configuration somehow. The rc scripts that are run are sensitive to the nature of the session. Your console login is a interactive login shell, while under X it's merely a interactive shell. You might want to track down the scripts that run in the two situations. My first guess would be that your ~/.bashrc sets up completion, but that file is not called from /etc/profile. If that's not it you have some debugging to do. When I have to do something like that, I pepper all of the rc scripts with lines like [ -e /etc/conf.d/DEBUG ] echo ~$USER/.bashrc: \$-='$-'\ (modify according to what info you want and what script it's in) then touch or rm the file /etc/conf.d/DEBUG. Don't forget to include system scripts like /etc/profile and anything else mentioned in the man page (INVOCATION section). HTH -- Kevin O'Gorman, PhD
[gentoo-user] Re: Bash completion problem: can anyone confirm?
Mick wrote: On Sunday 04 January 2009, Graham Murray wrote: Willie Wong ww...@princeton.edu writes: Before I file a bug, I want to see if this is reproducible by others: After I boot into the console, if I type anything and then hit tab for the bash completion, it gives an error -bash: _filedir: command not found The weird thing is that if I start X and try the same in an aterm, the tab completion works as expected. I am currently on bash-completion-20081218, does anyone else have the same problem? I only saw the problem with vim, and then only for user root as a normal user it worked fine. So I disabled bash completion for vim. Check your relevant ~/.bashrc for this: ##uncomment the following to activate bash-completion: #[ -f /etc/profile.d/bash-completion ] \ source /etc/profile.d/bash-completion There's not such entry in my .bashrc.