Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] bash-completion for git
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bienchen
Apprentice
Apprentice


Joined: 14 Sep 2004
Posts: 261
Location: Hamburg, Germany

PostPosted: Sat Jul 04, 2009 7:05 pm    Post subject: [solved] bash-completion for git Reply with quote

Hi there,

I want to enable bash completion for git. Therefore I shouted

Code:

eselect bashcomp enable 2 --globally


To my system. But no tab-actions...so whatnow?

greetings,

bienchen


Last edited by bienchen on Mon Jul 06, 2009 6:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
jamapii
l33t
l33t


Joined: 16 Sep 2004
Posts: 637

PostPosted: Sat Jul 04, 2009 9:10 pm    Post subject: Reply with quote

I tried it, works for me... after doing ". /etc/profile"
Back to top
View user's profile Send private message
bienchen
Apprentice
Apprentice


Joined: 14 Sep 2004
Posts: 261
Location: Hamburg, Germany

PostPosted: Sat Jul 04, 2009 9:18 pm    Post subject: Reply with quote

Nope, does not work for me.

greetings,

bienchen
Back to top
View user's profile Send private message
jamapii
l33t
l33t


Joined: 16 Sep 2004
Posts: 637

PostPosted: Sat Jul 04, 2009 10:14 pm    Post subject: Reply with quote

I did "eselect bashcomp list" and found git in the list, then did "eselect bashcomp enable git", then again "eselect bashcomp list" to verify there is an asterisk after git. Didn't bother with the numbers.

Then I found /etc/bash_completion.d/git and verified that it is a symlink to /usr/share/bash-completion/git, which exists.

Then I still had to do ". /etc/profile" to see a difference. After typing "git che" TAB TAB, it showed me
checkout cherry cherry-pick

If I'm not in a git directory, I get "fatal: error processing config file(s)"

You can try the same, see what's different on your system.
Back to top
View user's profile Send private message
bienchen
Apprentice
Apprentice


Joined: 14 Sep 2004
Posts: 261
Location: Hamburg, Germany

PostPosted: Sat Jul 04, 2009 10:34 pm    Post subject: Reply with quote

Aha!

Now we are getting somewhere...

I have /usr/share/bash-completion/ with everything, but no /etc/bash_completion.d/.

Any idea what I have to do to get the /etc dir?

greetings,

bienchen
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Sat Jul 04, 2009 11:44 pm    Post subject: Re: bash-completion for git Reply with quote

bienchen wrote:
Hi there,

I want to enable bash completion for git. Therefore I shouted

Code:

eselect bashcomp enable 2 --globally


To my system. But no tab-actions...so whatnow?

greetings,

bienchen


Code:

eselect bashcomp enable --global git

_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
jamapii
l33t
l33t


Joined: 16 Sep 2004
Posts: 637

PostPosted: Sun Jul 05, 2009 12:31 pm    Post subject: Reply with quote

After using "grep /etc/bash_completion.d /var/db/pkg/*/*/CONTENTS", I see that only openoffice and gentoo-bashcomp install files there. I don't know how it is supposed to be created. You can create it manually, then repeat the eselect commands.
Back to top
View user's profile Send private message
bienchen
Apprentice
Apprentice


Joined: 14 Sep 2004
Posts: 261
Location: Hamburg, Germany

PostPosted: Sun Jul 05, 2009 1:41 pm    Post subject: Reply with quote

Thanks. Now I have the /etc/bash_completion.d directory. But sourcing /etc/profile still doesn't help. Any mor suggestions?

greetings,

bienchen

P.S.:

With

eselect bashcomp enable --global git

I got my /etc/bash_completion.d
Back to top
View user's profile Send private message
bienchen
Apprentice
Apprentice


Joined: 14 Sep 2004
Posts: 261
Location: Hamburg, Germany

PostPosted: Mon Jul 06, 2009 6:42 pm    Post subject: Reply with quote

Arrgh! Dis hurts so badly!

First of all, I should've done a neat

Code:

emerge bash-completion


*bump*

bienchen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum