Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 270044 - bash completion for dev-ruby/rake
Summary: bash completion for dev-ruby/rake
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Ruby Team
URL: http://git.debian.org/?p=collab-maint...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-16 11:36 UTC by Gian
Modified: 2010-01-03 16:47 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gian 2009-05-16 11:36:50 UTC
The debian rake package includes a bashcompletion file for rake, which is pretty useful considering the number of rake tasks that e.g. rails provides. It would be cool if that were installed with the dev-ruby/rake ebuild, too. 

Reproducible: Always

Steps to Reproduce:
1. rails .
2. rake <TAB><TAB>

Actual Results:  
List of files. 

Expected Results:  
List of rake tasks.
Comment 1 Hans de Graaff gentoo-dev Security 2009-08-22 20:24:50 UTC
Thanks for the report. I've just added this to the tree as dev-ruby/rake-0.8.7-r1.
Comment 2 Gian 2009-12-17 10:40:15 UTC
It doesn't seem to be working. complete | grep rake doesn't return anything.  That's probably due to this test: [ -n "${have:-}" ]. I have no idea what that is supposed to do, may this be something Debian specific?
Comment 3 Hans de Graaff gentoo-dev Security 2010-01-01 19:22:39 UTC
(In reply to comment #2)
> It doesn't seem to be working. complete | grep rake doesn't return anything. 
> That's probably due to this test: [ -n "${have:-}" ]. I have no idea what that
> is supposed to do, may this be something Debian specific?

"complete -o filenames -F _rake rake"

Did you turn on the completion using "eselect bashcomp"?

Comment 4 Gian 2010-01-02 23:42:16 UTC
(In reply to comment #3)
> Did you turn on the completion using "eselect bashcomp"?
> 
I did. 
Comment 5 Hans de Graaff gentoo-dev Security 2010-01-03 13:50:39 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Did you turn on the completion using "eselect bashcomp"?
> > 
> I did. 

So rake does show up with a * behind it when doing 'eselect bashcomp list', but it does not show up when typing 'complete'?

CC'ing the bash-completion folks as they might have more insight.
Comment 6 Gian 2010-01-03 16:22:25 UTC
(In reply to comment #5) 
> So rake does show up with a * behind it when doing 'eselect bashcomp list', but
> it does not show up when typing 'complete'?
That's right:

gidoca@localhost ~ $ eselect bashcomp list | grep rake
  [108] rake *
gidoca@localhost ~ $ complete | grep rake
gidoca@localhost ~ $

This is true for both my amd64 desktop and my x86 laptop. 

Besides, replacing the line "[ -n "${have:-}" ] && complete -F _rake $filenames rake" by "complete -F _rake $filenames rake" in /usr/share/bash-completion/rake makes it work. 
Comment 7 Hans de Graaff gentoo-dev Security 2010-01-03 16:47:33 UTC
I see what you mean now. I've changed this in rake-0.8.7-r3 to follow the same pattern as the other bash-completion files, so hopefully that fixes it for you. Please reopen if that is not the case.