public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Bash completion annoyance: escapes directory variables.
@ 2009-01-17 13:23 Jean-Baptiste Mestelan
  2009-01-17 15:27 ` Stroller
  0 siblings, 1 reply; 6+ messages in thread
From: Jean-Baptiste Mestelan @ 2009-01-17 13:23 UTC (permalink / raw
  To: gentoo-user

Hello all.


Now, I am unsure whether this is a feature, but:
when I tab-complete 'cd ' followed  an environment variable, bash
insists on escaping this variable.

ex: cd $<TAB> -> cd \$
Which means I end up typing for example
# cd \$DOC
and this is not resolved right.

If the variable path is not preceded by 'cd ' , bash completes it OK,
without escaping them.


Is there any way I can fix this behaviour ?
Thanks for your tips.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash completion annoyance: escapes directory variables.
  2009-01-17 13:23 [gentoo-user] Bash completion annoyance: escapes directory variables Jean-Baptiste Mestelan
@ 2009-01-17 15:27 ` Stroller
  2009-01-17 17:33   ` felix
  2009-01-17 19:59   ` Jean-Baptiste Mestelan
  0 siblings, 2 replies; 6+ messages in thread
From: Stroller @ 2009-01-17 15:27 UTC (permalink / raw
  To: gentoo-user


On 17 Jan 2009, at 13:23, Jean-Baptiste Mestelan wrote:
> ...
> Now, I am unsure whether this is a feature, but:
> when I tab-complete 'cd ' followed  an environment variable, bash
> insists on escaping this variable.
>
> ex: cd $<TAB> -> cd \$
> Which means I end up typing for example
> # cd \$DOC
> and this is not resolved right.
>
> If the variable path is not preceded by 'cd ' , bash completes it OK,
> without escaping them.

A system here does the same thing, another across town behaves  
"correctly".

(I don't actually have $DOC set on either, but `cd /` and then use  
autocomplete to `cd $HOME`, which is set.)

I don't know much about this, but I wonder if it may be related to  
some of Gentoo's 3rd-party Bash-completion features?


WORKING SYSTEM:

$ eselect bashcomp list
Available completions:
   [1]   eselect
   [2]   genlop *
   [3]   vim
   [4]   xxd
$


NON-WORKING SYSTEM:

$ eselect bashcomp list
Available completions:
   [1]   bash-completion-config
   [2]   bitkeeper
   [3]   bittorrent
   [4]   cksfv
   [5]   clisp
   [6]   dsniff
   [7]   freeciv
   [8]   gcl
   [9]   gentoo *
   [10]  gkrellm
   [11]  gnatmake
   [12]  harbour
   [13]  hg
   [14]  isql
   [15]  larch
   [16]  lilypond
   [17]  lisp
   [18]  mailman
   [19]  mcrypt
   [20]  modules
   [21]  mtx
   [22]  p4
   [23]  povray
   [24]  ri
   [25]  sbcl
   [26]  sitecopy
   [27]  snownews
   [28]  svk
   [29]  unace *
   [30]  unrar *
$


You might also check bash-completion USE flags.

Stroller.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash completion annoyance: escapes directory variables.
  2009-01-17 15:27 ` Stroller
@ 2009-01-17 17:33   ` felix
  2009-01-17 19:59   ` Jean-Baptiste Mestelan
  1 sibling, 0 replies; 6+ messages in thread
From: felix @ 2009-01-17 17:33 UTC (permalink / raw
  To: gentoo-user

On Sat, Jan 17, 2009 at 03:27:04PM +0000, Stroller wrote:
>
> On 17 Jan 2009, at 13:23, Jean-Baptiste Mestelan wrote:
>> ...
>> Now, I am unsure whether this is a feature, but:
>> when I tab-complete 'cd ' followed  an environment variable, bash
>> insists on escaping this variable.
>>
>> ex: cd $<TAB> -> cd \$
>> Which means I end up typing for example
>> # cd \$DOC
>> and this is not resolved right.
>>
>> If the variable path is not preceded by 'cd ' , bash completes it OK,
>> without escaping them.
>
> A system here does the same thing, another across town behaves "correctly".
>
> (I don't actually have $DOC set on either, but `cd /` and then use 
> autocomplete to `cd $HOME`, which is set.)
>
> I don't know much about this, but I wonder if it may be related to some of 
> Gentoo's 3rd-party Bash-completion features?

I have the same problem, and it also won't tab complete file names
inside back quotes as it used to.  If I have /tmp/fix-me-now, this
will simply beep.  It used to work.  I have gotten so used to gentoo
enhancements screwing up things like this that I won't waste time
filing bug reports or whining on the mailing liost until it has gone
several weeks without being fixed.  I figure sooner or later some dev
will notice it without haviung to ignore my whinings in the mean time.

$ emacs `cat /tmp/fix[TAB]

-- 
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash completion annoyance: escapes directory variables.
  2009-01-17 15:27 ` Stroller
  2009-01-17 17:33   ` felix
@ 2009-01-17 19:59   ` Jean-Baptiste Mestelan
  2009-01-17 23:59     ` Peter Alfredsen
  1 sibling, 1 reply; 6+ messages in thread
From: Jean-Baptiste Mestelan @ 2009-01-17 19:59 UTC (permalink / raw
  To: gentoo-user

2009/1/17 Stroller <stroller@stellar.eclipse.co.uk>:
>
> I don't know much about this, but I wonder if it may be related to some of
> Gentoo's 3rd-party Bash-completion features?

I have unmerged gentoo-bashcomp, but the problem remains. So, this
would put the blame on bash-completion.

I am using bash-completion-20060301. Following your message, I have
upgraded to latest (unstable) bash-completion-20081218
*and this solved the original problem* : tab-completion now does not
escape variables after 'cd' !

BUT (there had to be a 'but') ...
gentoo-bashcomp does not play well with this latest version, meaning
that after re-installing bashcomp, completion does not work after
gentoo commands (emerge, ebuild ...).


So, I think I will get back to bash-completion-20060301, and use cdb
instead of path variables.

Thanks for attention and suggestions.


> You might also check bash-completion USE flags.

# equery uses app-shells/bash-completion
[ Searching for packages matching app-shells/bash-completion... ]
[ Colour Code : set unset ]
[ Legend : Left column  (U) - USE flags from make.conf              ]
[        : Right column (I) - USE flags packages was installed with ]
[ No USE flags found for app-shells/bash-completion-20060301]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash completion annoyance: escapes directory variables.
  2009-01-17 19:59   ` Jean-Baptiste Mestelan
@ 2009-01-17 23:59     ` Peter Alfredsen
  2009-01-18  0:41       ` Jean-Baptiste Mestelan
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Alfredsen @ 2009-01-17 23:59 UTC (permalink / raw
  To: gentoo-user

On Sat, 17 Jan 2009 20:59:38 +0100
"Jean-Baptiste Mestelan" <mestelan@gmail.com> wrote:

> BUT (there had to be a 'but') ...
> gentoo-bashcomp does not play well with this latest version, meaning
> that after re-installing bashcomp, completion does not work after
> gentoo commands (emerge, ebuild ...).

Did you try using unstable gentoo-bashcomp too?

/PA



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Bash completion annoyance: escapes directory variables.
  2009-01-17 23:59     ` Peter Alfredsen
@ 2009-01-18  0:41       ` Jean-Baptiste Mestelan
  0 siblings, 0 replies; 6+ messages in thread
From: Jean-Baptiste Mestelan @ 2009-01-18  0:41 UTC (permalink / raw
  To: gentoo-user

2009/1/18 Peter Alfredsen <loki_val@gentoo.org>:
> Did you try using unstable gentoo-bashcomp too?

Yes, exact same result, meaning gentoo specific completion is disabled.
Does it work for you folks ?



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-18  0:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-17 13:23 [gentoo-user] Bash completion annoyance: escapes directory variables Jean-Baptiste Mestelan
2009-01-17 15:27 ` Stroller
2009-01-17 17:33   ` felix
2009-01-17 19:59   ` Jean-Baptiste Mestelan
2009-01-17 23:59     ` Peter Alfredsen
2009-01-18  0:41       ` Jean-Baptiste Mestelan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox