1. The exact number of categories in portage tree is (at the time of writing this bug-report) 153 (152 '*-*' categories + 'virtual'). '_pkgname -A' returns… 155, becouse it uses ${portdir}/metadata/cache for completion. 2. If system makes use of overlays, then every duplicated category won't be filtered. This results in premature end of completion, becouse test below fails in case of duplicates: 'if [[ ${#COMPREPLY[@]} == 1 ]]; then' (line #122). Possible resolution consists of two parts: 1. use ${portdir} to look for categories. It is safe if you use proper filter; 2. filter duplicates, using hack from emerge completion command. Reproducible: Always Steps to Reproduce: a) 1. # equery list<Tab><Tab> b) 1. install any overlay (sunrise for instance) 2. # equery list mail-m<Tab> Actual Results: a) 'Display all 155 possibilities? (y or n)' b) '# equery list mail-mta/ ' Don't miss the space after completed category, to continue completion you must hit 'backspace' Expected Results: a) 'Display all 153 possibilities? (y or n)' b) '# equery list mail-mta/'
Created attachment 216952 [details, diff] patch fixing both issues in a way described above
Ebuild containing patches for this bug and #298919 and #298916: http://bitbucket.org/mruwek/larrytheant/src/tip/app-shells/gentoo-bashcomp/
Created attachment 216978 [details, diff] Do not show our variables to the world ;)
Created attachment 217026 [details, diff] Sorry, bad filenames in header.
Looks like analogical issue exists with packages completion. Steps to reproduce: 1. install mpd overlay 2. enable 'gentoo' from app-shells/gentoo-bashcomp 3. # equery list media-sound/sona<Tab> Actual results: '# equery list media-sound/sonata ' To complete version you must hit <Backspace> and <Tab> again. Patch in few minutes.
Created attachment 217032 [details, diff] patch for issue described in comment #5
Thanks, applied to trunk
Thanks again for the patches. 20100613 is in the tree! + 13 Jun 2010; Jeremy Olexa <darkside@gentoo.org> + +gentoo-bashcomp-20100613.ebuild: + Version bump to fix bugs: 298919, 298916, 301582, 269498, 287092. Add + Gentoo Prefix support.