Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218557 - eselect bashcomp enable [TAB] -> Killed
Summary: eselect bashcomp enable [TAB] -> Killed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-04-20 12:26 UTC by Federico Ferri (RETIRED)
Modified: 2009-09-18 19:43 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Replacement for the current eselect completion script (eselect,3.43 KB, text/plain)
2008-07-31 00:41 UTC, Wilke Schwiedop
Details
Some changes to previous replacement (eselect,4.13 KB, text/plain)
2008-08-23 18:02 UTC, Wilke Schwiedop
Details
Patch to add Wilke Schwiedop's bash completion script changes (eselect-1.0.11-fix-bash-completion.patch,5.13 KB, patch)
2009-02-15 22:58 UTC, Colin Shapiro
Details | Diff
New ebuild that applies the patch I attached (eselect-1.0.11-r1.ebuild,1.58 KB, text/plain)
2009-02-15 22:59 UTC, Colin Shapiro
Details
Updated bash-completion script for eselect (eselect,4.27 KB, text/plain)
2009-03-24 03:29 UTC, Tom Samstag
Details
Fix for eselect.bashcomp (eselect-1.0.11-bashcomp.patch,788 bytes, patch)
2009-04-15 10:09 UTC, Ulrich Müller
Details | Diff
eselect.bashcomp (eselect.bashcomp,915 bytes, text/plain)
2009-04-15 14:15 UTC, Ulrich Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Federico Ferri (RETIRED) gentoo-dev 2008-04-20 12:26:38 UTC
if I type:

 eselect bashcomp enable [TAB]

I get a 'Killed' string printed to terminal:

 eselect bashcomp enable Killed

and it messes up the bash shell (i.e. history doesn't work anymore)
Comment 1 Daniel Nilsson 2008-04-23 19:31:48 UTC
I can confirm this problem with tab-completion and eselect.
It seems to happen for all eselect modules if you hit TAB after the command, i.e:
$ eselect <module> <command> [TAB] Killed

emerge -pv eselect bash-completion
[ebuild   R   ] app-admin/eselect-1.0.10  USE="bash-completion vim-syntax -doc"
[ebuild   R   ] app-shells/bash-completion-20050121-r10

emerge --info
Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r4 x86_64 Intel(R) Core(TM)2 Quad CPU @ 2.40GHz
Timestamp of tree: Wed, 23 Apr 2008 02:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/var/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.gentoo.se http://ftp.public.fix.fi/gentoo http://mirror.gentoo.no"
LANG="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/var/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage"
PORTDIR_OVERLAY="/var/overlays/layman/java-overlay /var/overlays/local"
SYNC="rsync://rsync.se.gentoo.org/gentoo-portage"
USE="X aac alsa amd64 apache2 bash-completion berkdb bzip2 cairo cdr cli cracklib dri dvd dvdr dvdread emboss evo fam firefox fortran gdbm gif gtk hddtemp iconv isdnlog java jpeg mad midi mmx mp3 mpeg mudflap ncurses nptl nptlonly offensive ogg opengl openmp pam pcre perl png pppd python qt3support qt4 quicktime readline reflection sdl session source spl sse sse2 ssl ssse3 svg tiff timidity truetype unicode vim-syntax vorbis wma xinerama xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Maciej Grela 2008-05-24 12:42:08 UTC
Is someone working on this ? It`s still broken in newest versions of eselect and bashcomp:

idaho ~ # eselect rc start <TAB>Killed.

idaho ~ # paludis -ip bash-completion eselect
--------------- >8
* app-shells/bash-completion [R 20060301] <target>
    Reasons: app-shells/gentoo-bashcomp-20080521:0::installed
    99.96 kBytes to download
* app-admin/eselect [R 1.0.11-r1] <target>
    Reasons: app-admin/eselect-ctags-1.4:0::installed, app-admin/eselect-vi-1.1.5:0::installed, 2 more
    bash-completion -doc vim-syntax
    149.75 kBytes to download

Total: 2 packages (2 rebuilds), 249.71 kBytes to download

 * No unread news items found

Is someone working on this ?
Comment 3 Wilke Schwiedop 2008-07-31 00:41:39 UTC
Created attachment 161784 [details]
Replacement for the current eselect completion script

Here's a replacement for the current completion script. 
The old script should be located under "/usr/share/bash-completion/eselect" 

I havent had too much time to test it, but it should work fine. If you find any bugs, let me know.

Known Bugs:
- global-options are shown, but completion doesnt actually work for them. No clue why.
Comment 4 Wilke Schwiedop 2008-08-23 18:02:42 UTC
Created attachment 163661 [details]
Some changes to previous replacement

Changes:
- Fixed global options bug
- Remove already used words from completion
- Misc changes

Did anyone actually test my submission? Or even have a look at it?
Comment 5 Ilia Pozhilov 2008-12-11 08:25:04 UTC
(In reply to comment #4)
> Did anyone actually test my submission? Or even have a look at it?

Works for me, thanks. Why don't you contribute? The original eselect bash-completion script is really poor.
Comment 6 Wilke Schwiedop 2008-12-11 20:22:56 UTC
(In reply to comment #5)
> Works for me, thanks. Why don't you contribute? The original eselect
> bash-completion script is really poor.
Good question. I thought posting it here and waiting for things to happen would count as 'contributing'.

Comment 7 Colin Shapiro 2009-02-15 22:58:07 UTC
Created attachment 182176 [details, diff]
Patch to add Wilke Schwiedop's bash completion script changes

I created a patch to stick in an overlay's "files" directory, and a new app-admin/eselect-1.0.11-r1 ebuild (forthcoming).

These files will change the /usr/share/bash-completion/eselect script to Wilke Schwiedop's new one.

Forgive me if this isn't extremely helpful, but I am new to this and I have no idea how to get the actual script in the eselect source changed.
Comment 8 Colin Shapiro 2009-02-15 22:59:13 UTC
Created attachment 182177 [details]
New ebuild that applies the patch I attached

New ebuild (see my previous comment).
Comment 9 Tom Samstag 2009-03-24 03:29:51 UTC
Created attachment 186066 [details]
Updated bash-completion script for eselect

I was happy to see a script on here that didn't crash when trying to use bash-completion for eselect, but I was disappointed when it still wouldn't show tab completions for bash-completion modules I could enable/disable. This addition adds the list of targets to the bash completion. It doesn't seem to find the completions for all eselect scripts (some don't use find_targets, and their find_implementations don't run without eselect boilerplate code) but it adds a lot of functionality to the scripts it does support
Comment 10 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-04-08 04:24:52 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Works for me, thanks. Why don't you contribute? The original eselect
> > bash-completion script is really poor.
> Good question. I thought posting it here and waiting for things to happen would
> count as 'contributing'.
> 

Wilke,
You will have to willingly change the copyright if you want us to use this one =/ (Unfortunately, now anyone that has looked at it cannot change it - only you can)
Comment 11 Wilke Schwiedop 2009-04-09 17:00:46 UTC
(In reply to comment #10)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Works for me, thanks. Why don't you contribute? The original eselect
> > > bash-completion script is really poor.
> > Good question. I thought posting it here and waiting for things to happen would
> > count as 'contributing'.
> > 
> 
> Wilke,
> You will have to willingly change the copyright if you want us to use this one
> =/ (Unfortunately, now anyone that has looked at it cannot change it - only you
> can)
> 
Alright, so I agree to make the script part of Gentoo.
Comment 12 Xake 2009-04-09 18:10:43 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #6)
> > > (In reply to comment #5)
> > > > Works for me, thanks. Why don't you contribute? The original eselect
> > > > bash-completion script is really poor.
> > > Good question. I thought posting it here and waiting for things to happen would
> > > count as 'contributing'.
> > > 
> > 
> > Wilke,
> > You will have to willingly change the copyright if you want us to use this one
> > =/ (Unfortunately, now anyone that has looked at it cannot change it - only you
> > can)
> > 
> Alright, so I agree to make the script part of Gentoo.
> 

Do you not have to upload a new script with a new header assigning the copyrights to Gentoo like in ebuilds?

http://devmanual.gentoo.org/ebuild-writing/file-format/index.html
Comment 13 Xake 2009-04-09 18:13:54 UTC
I also found this looking around where they in the example has the copyright headers, but they do not point out how important that is and why. Maybe for you devs to update it to at least tell if the headers i crusial or not as it is currently not mentioned at all.

http://www.gentoo.org/proj/en/eselect/dev-guide.xml
Comment 14 Ulrich Müller gentoo-dev 2009-04-15 10:09:29 UTC
Created attachment 188408 [details, diff]
Fix for eselect.bashcomp

Hi, I'm collecting various bugfixes that could go into a eselect-1.0.12 release. It would be nice to fix this bug, but I think a complete re-implementation of the bash-completion module is too intrusive for a bug-fix release.

Could you please try if attached patch fixes the issue for you?
Comment 15 Ulrich Müller gentoo-dev 2009-04-15 14:15:26 UTC
Created attachment 188450 [details]
eselect.bashcomp

In fact the sed expression must also be replaced, because it will fail with --no-colour, or when bug 198461 is fixed. (Currently, it matches for strings like "1m" which is part of an ANSI terminal escape sequence: "ESC [ 1 m" for bold.)

Please test if attached version fixes the issue for you. (I've attached the full file instead of a patch, since it's short and probably easier for testing.)
Comment 16 Ulrich Müller gentoo-dev 2009-04-15 15:21:53 UTC
(In reply to comment #15)
> Please test if attached version fixes the issue for you.

To clarify, since another developer made a mistake here:
This should go to /usr/share/bash-completion/eselect (and _not_ to /usr/share/eselect/modules/bashcomp.eselect).
Comment 17 Federico Ferri (RETIRED) gentoo-dev 2009-04-16 18:30:08 UTC
(In reply to comment #15)
> Created an attachment (id=188450) [edit]
> eselect.bashcomp

> Please test if attached version fixes the issue for you.

thanks, works for me
Comment 18 Ulrich Müller gentoo-dev 2009-04-16 18:43:35 UTC
Committed to SVN trunk (r431) and 1.0.x branch (r432).

@Wilke: This _doesn't_ imply that we disapprove your completion script. It may be included in a later (1.1?) version.
Comment 19 Ulrich Müller gentoo-dev 2009-04-18 08:36:24 UTC
Fixed in 1.0.12.

Please open a new bug for any enhancements that should go into 1.1.
Comment 20 Wilke Schwiedop 2009-09-18 17:00:13 UTC
The recent update of eselect brought this bug to my attention, because it overwrote my own bashcomp script once again.
It's been over a year since I originally submitted my script and it appears it has since been forgotten - which really makes me question your workflow:
There's a bug open for ages until finally someone posts a fix that by the way works a lot faster.
So instead of putting that script in a later release, someone else then writes another fix to the very same bug only to get it included a few versions erlier. Well, if it was so pressing, why did it take so long in the first place?

So why am I writing this?
Initially I thought "So what, it works well on my computer", but since one or two people subscribed to this bug and even improved the script further, I thought I should at least tell them I'm not going to do anything else towards getting this script included in gentoo.
So, if someone cares, go ahead. If not - well "It works for me".
Comment 21 Ulrich Müller gentoo-dev 2009-09-18 17:19:13 UTC
Please read comment #19 again.
Comment 22 Wilke Schwiedop 2009-09-18 17:56:03 UTC
(In reply to comment #21)
> Please read comment #19 again.
> 

(From comment #20)
> So, if someone cares, go ahead. If not - well "It works for me".