Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bashcomp woes
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
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 349

PostPosted: Mon Oct 29, 2012 8:36 pm    Post subject: bashcomp woes Reply with quote

When bash completion (as in eselect bashcomp) is disabled, "cd ~/<tab>" will offer the list of all files and directories in the home directory for completion. "cd $HOME/<tab>" will do the same.

When bash completion is enabled, "cd ~/<tab>" will offer the list of just the directories (an improvement), but "cd $HOME/<tab>" will offer nothing (a huge letdown).

In fact, all commands I have tried enabling completion for behave the same. When FOO is set to /some/path, "$FOO/<tab>" gives nothing. With completion disabled, "$FOO/<tab>" gives the list of files under /some/path.

Can something be done about it?
_________________
!זה הכי, אחי Gentoo
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2247

PostPosted: Tue Oct 30, 2012 3:44 am    Post subject: Re: bashcomp woes Reply with quote

pygoscelis wrote:
Can something be done about it?

pygoscelis ... I'm not that familiar with bash completion but both bash and zsh have 'cdable_vars' (bash: 'shopt -s cdable_vars').

Perhaps unrelated but there was also a bug (fixed in patch bash4.2-029) which caused some odd behavior in this regard, but this should be fixed in the current stable bash (4.2_p37).

Anyhow, with zsh

cd $HOME<tab> expands
cd ~<tab> expands
command ~<tab> expands

best ... khay
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 349

PostPosted: Tue Oct 30, 2012 6:41 pm    Post subject: Re: bashcomp woes Reply with quote

khayyam wrote:

Anyhow, with zsh

cd $HOME<tab> expands
cd ~<tab> expands
command ~<tab> expands

best ... khay


Yeah, looks like a switch to zsh is in order...
_________________
!זה הכי, אחי Gentoo
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2247

PostPosted: Wed Oct 31, 2012 3:28 am    Post subject: Re: bashcomp woes Reply with quote

pygoscelis wrote:
Yeah, looks like a switch to zsh is in order...

pygoscelis ... be sure to add 'zsh-completion' to your useflags as though zsh comes with its own completions, the useflag will enable any additonal compeletions that might be provided with a package (ie: gentoolkit, eix, layman, etc).

Also, if you want to peruse my .zshrc, .zprofile, .zsh/{functions,completions,scripts}, .zshenv, .zlog{in,out} just PM me.

best ... khay
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