Re: [gentoo-user] bash_completion
On Tue, 9 Jan 2007, Willie Wong wrote: Hum non reproducible? If it never occurs again, I suggest you not worry about it. If it occurs randomly... hardware problem? The box is not new, but I have no reason to suppose it's starting to fail. At least, ide-smart keeps producing happy reports. Good luck, Thank you. -- Jorge -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Monday 08 January 2007 00:25, Willie Wong wrote: On Sun, Jan 07, 2007 at 10:17:59PM +, Penguin Lover Jorge Almeida squawked: Not really all kind of completion, but I noticed that it froze on trivial completions (the kind that should work even without bash-completion). Hold on, so the command completions, like say tar tabtab giving you A c d r t u x actually works, but filename completion doesn't? (It might help pin point the problem.) I won't be able to access my home box for a few days. I will try all your suggestions then. Not sure if this helps: I do not have bash-completion emerged in my system and I am running bash-3.1_p17. The relevant bash line in my .bashrc looks slightly different to Jorge's: === ##uncomment the following to activate bash-completion: #[ -f /etc/profile.d/bash-completion ] source /etc/profile.d/bash-completion === (note the single [ brackets) and it is commented out. Nevertheless, bash completion seems to work fine both in completing commands and filenames and in listing options if more than one alternative is present. -- Regards, Mick pgp4mMoK3zuWi.pgp Description: PGP signature
Re: [gentoo-user] bash_completion
On 1/9/07, Mick [EMAIL PROTECTED] wrote: On Monday 08 January 2007 00:25, Willie Wong wrote: On Sun, Jan 07, 2007 at 10:17:59PM +, Penguin Lover Jorge Almeida squawked: Not really all kind of completion, but I noticed that it froze on trivial completions (the kind that should work even without bash-completion). Hold on, so the command completions, like say tar tabtab giving you A c d r t u x actually works, but filename completion doesn't? (It might help pin point the problem.) I won't be able to access my home box for a few days. I will try all your suggestions then. Not sure if this helps: I do not have bash-completion emerged in my system and I am running bash-3.1_p17. The relevant bash line in my .bashrc looks slightly different to Jorge's: === ##uncomment the following to activate bash-completion: #[ -f /etc/profile.d/bash-completion ] source /etc/profile.d/bash-completion === (note the single [ brackets) and it is commented out. Nevertheless, bash completion seems to work fine both in completing commands and filenames and in listing options if more than one alternative is present. -- Regards, Mick Interesting to note, with Bash-3.2 2006-03-01 Bash-Completion, you'll find if you check your latest /etc/skel/.bashrc which is provided to new users now completely lacks the bash completion line, and upon merging of that 20060301 bash completion it notifies you that hey, you dont need to even do that anymore cos we thought it was kludgy and tells you just to do an eselect bashcomp enable base but I cant vouch for that actually working :/ -- /ent Fredric (aka theJackal) -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sun, 7 Jan 2007, Willie Wong wrote: how about if you do compgen -F _longopt It should print out an unsorted list of all the files and subdirs of the given dir. Does it freeze up? It doesn't freeze, and it displays what you said. However, the first two output lines are: ash: compgen: warning: -F option may not work as you expect bash: COMP_WORDS: bad array subscript If it doesn't, we can almost be sure that the problem is not with the bash-completion script itself, since invoking compgen -F _longopt should be the same as when you type less tabtab on the commandline. (At the same time, it might put hunting down the exact problem out of my league.) You mentioned that it seems to freeze for all completion you tried, have you tried the following: unzip tabtab (should just show a list of files ending in zip, ZIP jar, exe, pk3, etc...) xv(a list of image files) qiv (a list of image files) vim (a list of files that are not image files or archives) and kill tabtab (should return a list of pids) can you please try those and report back? Yes, it all works as expected. I also tried userdel as root, and it displays the names of existing users. The trivial filename completion (less RE) also works. The same for tar, which displays A c d r t u x. So, everything seem right. The problem is that it froze the box then, even if not now. I checked with top that there was nothing else competing for ressources. I suppose I'll wait to see whether the problem comes back... Thanks, Jorge -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Wed, 10 Jan 2007, Kent Fredric wrote: Interesting to note, with Bash-3.2 2006-03-01 Bash-Completion, you'll find if you check your latest /etc/skel/.bashrc which is provided to new users now completely lacks the bash completion line, Yes, the same goes for the stable version. and upon merging of that 20060301 bash completion it notifies you that hey, you dont need to even do that anymore cos we thought it was kludgy and tells you just to do an I just emerged the ~x86 version (bash-completion-20060301) and couldn't find that in the emerge notifications. eselect bashcomp enable base but I cant vouch for that actually working :/ $ eselect bashcomp enable base !!! Error: /usr/share/bash-completion/base doesn't exist Thanks. -- Jorge Almeida -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On 1/10/07, Jorge Almeida [EMAIL PROTECTED] wrote: On Wed, 10 Jan 2007, Kent Fredric wrote: Interesting to note, with Bash-3.2 2006-03-01 Bash-Completion, you'll find if you check your latest /etc/skel/.bashrc which is provided to new users now completely lacks the bash completion line, Yes, the same goes for the stable version. and upon merging of that 20060301 bash completion it notifies you that hey, you dont need to even do that anymore cos we thought it was kludgy and tells you just to do an I just emerged the ~x86 version (bash-completion-20060301) and couldn't find that in the emerge notifications. eselect bashcomp enable base but I cant vouch for that actually working :/ $ eselect bashcomp enable base !!! Error: /usr/share/bash-completion/base doesn't exist Thanks. -- Jorge Almeida -- gentoo-user@gentoo.org mailing list Merging app-shells/bash-completion-20060301-r2 to / * * Versions of bash-completion prior to 20060301-r1 required each user to * explicitly source /etc/profile.d/bash-completion in ~/.bashrc. This * was kludgy and inconsistent with the completion modules which are * enabled with eselect bashcomp. Now any user can enable the base * completions without editing their .bashrc by running * * eselect bashcomp enable base * * The system administrator can also be enable this globally with * * eselect bashcomp enable --global base * * Additional completion functions can also be enabled or * disabled using eselect's bashcomp module. * app-shells/bash-completion-20060301-r2 merged. so ah, .. yeah. -- /ent Fredric (aka theJackal) -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Tue, Jan 09, 2007 at 08:37:01PM +, Penguin Lover Jorge Almeida squawked: On Sun, 7 Jan 2007, Willie Wong wrote: It doesn't freeze, and it displays what you said. However, the first two output lines are: ash: compgen: warning: -F option may not work as you expect bash: COMP_WORDS: bad array subscript Don't worry about those. The _longopts shell function is only intended to be used by bash_completion, so some global variables were undefined. So, everything seem right. The problem is that it froze the box then, even if not now. I checked with top that there was nothing else competing for ressources. Hum non reproducible? If it never occurs again, I suggest you not worry about it. If it occurs randomly... hardware problem? Good luck, W -- What the hell is a functional. And if its called a functional derivative, why can't I get it to work? ~DeathMech, Some Student. P-town PHY 205 Sortir en Pantoufles: up 33 days, 1:57 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sun, Jan 07, 2007 at 12:19:58AM +, Penguin Lover Mike Williams squawked: On Sunday 07 January 2007 00:03, Jorge Almeida wrote: Always using that much resources? That doesn't sound right. What completions were you trying when it freezes up? Something trivial: less README (it froze at RE) bash itself autocompletes filenames by default. Try turning off bash-completion and try that again, on the exact same file. Well... that's not exactly true. The bash_completion scripts add some intelligence to it. For example, if I type mplayer tabtab in my home directory, it will only show all sub-directories (including hidden ones) and files with proper secondary filenames (the REGEXP for the file endings that it accepts are (mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fli|FLI|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|mid|MID|ts|TS) You can look at /etc/bash_completion to see what programs have their behaviours modified. On the other hand, the only mention of 'less' in /etc/bash_completion /etc/bash_completion.d/gentoo is the line telling bash that, when you type less -tabtab it will fill in a second dash and show the list of long options. W -- Cogito Eggo Sum, I think I am from Waffle. (dative/ablative) Sortir en Pantoufles: up 30 days, 15:20 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sun, Jan 07, 2007 at 12:25:49AM +, Penguin Lover Jorge Almeida squawked: Already did it (commented out the line in ~/.bashrc and sourced this file...) It doesn't freeze now, of course. Which version of bash completion? And which version of bash? (Just want to check if you are running a different version from mine: I have 20050121-r10, everything else masked by ~) Now, with the bash-completion script sourced, what does it say when you type complete -p less (or tar, or mplayer?) if you are in the directory with the README file, what happens if you do compgen -f RE compgen -d RE does it freeze up your computer? /etc/bash_completion is just a big shell script, and it calls mostly bash builtin commands, so its resource hit really shouldn't be that high. W -- Seen outside the LINAC control room @ Fermi Nat'l Accelerator Laboratory: (an _official_ sign) PLEASE DON'T FEED THE OPERATORS Sortir en Pantoufles: up 30 days, 15:36 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sun, 7 Jan 2007, Willie Wong wrote: On Sun, Jan 07, 2007 at 12:25:49AM +, Penguin Lover Jorge Almeida squawked: Already did it (commented out the line in ~/.bashrc and sourced this file...) It doesn't freeze now, of course. Which version of bash completion? And which version of bash? app-shells/bash-completion-20050121-r10 app-shells/bash-3.1_p17 (Just want to check if you are running a different version from mine: I have 20050121-r10, everything else masked by ~) Now, with the bash-completion script sourced, what does it say when you type complete -p less (or tar, or mplayer?) $ complete -p less complete -o filenames -F _longopt less if you are in the directory with the README file, what happens if you do compgen -f RE compgen -d RE does it freeze up your computer? No, it just does its stuff as expected. /etc/bash_completion is just a big shell script, and it calls mostly bash builtin commands, so its resource hit really shouldn't be that high. Thanks. Jorge -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sun, Jan 07, 2007 at 06:10:55PM +, Penguin Lover Jorge Almeida squawked: Which version of bash completion? And which version of bash? app-shells/bash-completion-20050121-r10 app-shells/bash-3.1_p17 Okay, so you are on stable I see. $ complete -p less complete -o filenames -F _longopt less if you are in the directory with the README file, what happens if you do compgen -f RE compgen -d RE does it freeze up your computer? No, it just does its stuff as expected. how about if you do compgen -F _longopt It should print out an unsorted list of all the files and subdirs of the given dir. Does it freeze up? If it doesn't, we can almost be sure that the problem is not with the bash-completion script itself, since invoking compgen -F _longopt should be the same as when you type less tabtab on the commandline. (At the same time, it might put hunting down the exact problem out of my league.) You mentioned that it seems to freeze for all completion you tried, have you tried the following: unzip tabtab (should just show a list of files ending in zip, ZIP jar, exe, pk3, etc...) xv(a list of image files) qiv (a list of image files) vim (a list of files that are not image files or archives) and kill tabtab (should return a list of pids) can you please try those and report back? Best Wishes, W -- suddenly i have this urge to do like keenue reeves did in the matrix: open my eyes and say i know quantum mechanics. too bad it just doesn't have the same ring to it. Sortir en Pantoufles: up 30 days, 17:18 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sun, 7 Jan 2007, Willie Wong wrote: On Sun, Jan 07, 2007 at 06:10:55PM +, Penguin Lover Jorge Almeida squawked: how about if you do compgen -F _longopt It should print out an unsorted list of all the files and subdirs of the given dir. Does it freeze up? If it doesn't, we can almost be sure that the problem is not with the bash-completion script itself, since invoking compgen -F _longopt should be the same as when you type less tabtab on the commandline. (At the same time, it might put hunting down the exact problem out of my league.) You mentioned that it seems to freeze for all completion you tried, Not really all kind of completion, but I noticed that it froze on trivial completions (the kind that should work even without bash-completion). have you tried the following: unzip tabtab (should just show a list of files ending in zip, ZIP jar, exe, pk3, etc...) xv(a list of image files) qiv (a list of image files) vim (a list of files that are not image files or archives) and kill tabtab (should return a list of pids) can you please try those and report back? I won't be able to access my home box for a few days. I will try all your suggestions then. Thanks. -- Jorge -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sun, Jan 07, 2007 at 10:17:59PM +, Penguin Lover Jorge Almeida squawked: Not really all kind of completion, but I noticed that it froze on trivial completions (the kind that should work even without bash-completion). Hold on, so the command completions, like say tar tabtab giving you A c d r t u x actually works, but filename completion doesn't? (It might help pin point the problem.) I won't be able to access my home box for a few days. I will try all your suggestions then. Please do, Best, W -- Quidquid latine dictum sit, altum viditur. Sortir en Pantoufles: up 30 days, 22:33 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sat, Jan 06, 2007 at 10:44:19PM +, Penguin Lover Jorge Almeida squawked: I gave bash_completion a try, and it seemed a Good Thing. Problem is it was behaving like a pig, consuming all cpu ressources (99%) and freezing the computer (temporarily). This has to be a misconfiguration issue. I have both /etc/bash-completion and /etc/conf.d/bash_completion. Is this normal? Both files have a command to source a user completion file. I have a line [[ -f /etc/profile.d/bash-completion ]] source /etc/profile.d/bash-completion at the beginning of ~/.bashrc. Any suggestion? Always using that much resources? That doesn't sound right. What completions were you trying when it freezes up? What completions have you turned on? (eselect bashcomp list --global) I have only 'eselect' and 'gentoo' turned on. W -- He dropped his voice still lower. In the stillness, a fly would not have dared cleat its throat. Sortir en Pantoufles: up 29 days, 21:36 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sat, 6 Jan 2007, Willie Wong wrote: On Sat, Jan 06, 2007 at 10:44:19PM +, Penguin Lover Jorge Almeida squawked: Any suggestion? Always using that much resources? That doesn't sound right. What completions were you trying when it freezes up? Something trivial: less README (it froze at RE) What completions have you turned on? (eselect bashcomp list --global) I have only 'eselect' and 'gentoo' turned on. Everything is as it came. eselect bashcomp list --global shows a list of 30, with only a * following gentoo. Jorge -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sunday 07 January 2007 00:03, Jorge Almeida wrote: Always using that much resources? That doesn't sound right. What completions were you trying when it freezes up? Something trivial: less README (it froze at RE) bash itself autocompletes filenames by default. Try turning off bash-completion and try that again, on the exact same file. -- Mike Williams -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] bash_completion
On Sun, 7 Jan 2007, Mike Williams wrote: bash itself autocompletes filenames by default. I know, but I find bash_completion usefull for other types of completion (e.g tar xzvf ..., it completes with tarballs only). Try turning off bash-completion and try that again, on the exact same file. Already did it (commented out the line in ~/.bashrc and sourced this file...) It doesn't freeze now, of course. -- Jorge Almeida -- gentoo-user@gentoo.org mailing list