View previous topic :: View next topic |
Author |
Message |
pygoscelis Guru
Joined: 07 Jun 2003 Posts: 402
|
Posted: Mon Oct 29, 2012 8:36 pm Post subject: bashcomp woes |
|
|
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? |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Oct 30, 2012 3:44 am Post subject: Re: bashcomp woes |
|
|
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 |
|
|
pygoscelis Guru
Joined: 07 Jun 2003 Posts: 402
|
Posted: Tue Oct 30, 2012 6:41 pm Post subject: Re: bashcomp woes |
|
|
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... |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Wed Oct 31, 2012 3:28 am Post subject: Re: bashcomp woes |
|
|
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 |
|
|
|
|
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
|
|