public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* bash / readline problem with cd, directories with spaces, nospace
@ 2015-02-23 17:34 Henry S. Thompson
  2015-02-23 17:42 ` Henry S. Thompson
  0 siblings, 1 reply; 5+ messages in thread
From: Henry S. Thompson @ 2015-02-23 17:34 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Cygcheck output --]
[-- Type: application/x-gzip, Size: 8949 bytes --]

[-- Attachment #2: Type: text/plain, Size: 218 bytes --]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: bash / readline problem with cd, directories with spaces, nospace
  2015-02-23 17:34 bash / readline problem with cd, directories with spaces, nospace Henry S. Thompson
@ 2015-02-23 17:42 ` Henry S. Thompson
  2015-03-19 16:04   ` George Prekas
  0 siblings, 1 reply; 5+ messages in thread
From: Henry S. Thompson @ 2015-02-23 17:42 UTC (permalink / raw)
  To: cygwin

[OK, here's the message body I _thought_ I sent with the cygcheck
output which is all that appears to have been received...]

I _think_ this is a regression, but my memory for this sort of thing
is terrible.

With libreadline7-6.3.8-1, given that I have

 /c/Program Files
 /c/Program Files (x86)
 /c/ProgramData

If I type

 > cd /c/Prog[tab]

I get [bell/flash] and

 > cd /c/Program

All correct so far

 > cd /c/Program[tab]
 [bell/flash]
 > cd /c/Program[tab again]
 Program Files/    Program Files (x86)/    ProgramData/
 > cd /c/Program

Still as expected

 > cd /c/Program\ [tab]
 [bell/flash]

_Not_ as expected, should give

 Program Files/    Program Files (x86)/
 > cd /c/Program\ Files

Overriding the standard (Linux too, where I cannot reproduce the problem)
 complete -o nospace -F _cd cd
with 
 complete -o default -F _cd cd
fixes this, but I don't _think_ it used to happen.

Related (?) problem

 > cd /c/'Prog'[tab]

should result in

 > cd /c/Program

but in fact just gives [bell/flash]

Can anyone reproduce, either correct behaviour with earlier readline
and/or earlier bash-completion than 1.3-1, or same problem as me?

Or have I inadvertently screwed something up?

Thanks

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: bash / readline problem with cd, directories with spaces, nospace
  2015-02-23 17:42 ` Henry S. Thompson
@ 2015-03-19 16:04   ` George Prekas
  2015-03-19 17:53     ` Henry S. Thompson
  0 siblings, 1 reply; 5+ messages in thread
From: George Prekas @ 2015-03-19 16:04 UTC (permalink / raw)
  To: cygwin

On 23/02/2015 17:14, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:
> [OK, here's the message body I _thought_ I sent with the cygcheck
> output which is all that appears to have been received...]
>
> I _think_ this is a regression, but my memory for this sort of thing
> is terrible.
>
> With libreadline7-6.3.8-1, given that I have
>
>   /c/Program Files
>   /c/Program Files (x86)
>   /c/ProgramData
>
> If I type
>
>   > cd /c/Prog[tab]
>
> I get [bell/flash] and
>
>   > cd /c/Program
>
> All correct so far
>
>   > cd /c/Program[tab]
>   [bell/flash]
>   > cd /c/Program[tab again]
>   Program Files/    Program Files (x86)/    ProgramData/
>   > cd /c/Program
>
> Still as expected
>
>   > cd /c/Program\ [tab]
>   [bell/flash]
>
> _Not_ as expected, should give
>
>   Program Files/    Program Files (x86)/
>   > cd /c/Program\ Files
>
> Overriding the standard (Linux too, where I cannot reproduce the problem)
>   complete -o nospace -F _cd cd
> with
>   complete -o default -F _cd cd
> fixes this, but I don't _think_ it used to happen.
>
> Related (?) problem
>
>   > cd /c/'Prog'[tab]
>
> should result in
>
>   > cd /c/Program
>
> but in fact just gives [bell/flash]
>
> Can anyone reproduce, either correct behaviour with earlier readline
> and/or earlier bash-completion than 1.3-1, or same problem as me?
>
> Or have I inadvertently screwed something up?
>
> Thanks
>
> ht
>

Hi Henry,

I had the same trouble as you describe and I was using your workaround, 
but then I realized that find is broken in the same way.  So, I did some 
research and found out that Debian and Ubuntu have solved this problem 
by patching /etc/bash_completion as described in the following URLs:

<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739835>

<https://code.launchpad.net/~jjo/bash-completion/quote_readline_by_ref_fixes/+merge/210930>

I think Cygwin should incorporate the specified patch file in its 
bash-completion package.

Regards,
George


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: bash / readline problem with cd, directories with spaces, nospace
  2015-03-19 16:04   ` George Prekas
@ 2015-03-19 17:53     ` Henry S. Thompson
  2015-03-19 19:05       ` Eric Blake
  0 siblings, 1 reply; 5+ messages in thread
From: Henry S. Thompson @ 2015-03-19 17:53 UTC (permalink / raw)
  To: cygwin

George Prekas writes:

> On 23/02/2015 17:14, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:

>> I _think_ this is a regression, but my memory for this sort of thing
>> is terrible.
>> ...

> I had the same trouble as you describe and I was using your
> workaround, but then I realized that find is broken in the same way.
> So, I did some research and found out that Debian and Ubuntu have
> solved this problem by patching /etc/bash_completion as described in
> the following URLs:
>
> <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739835>
>
> <https://code.launchpad.net/~jjo/bash-completion/quote_readline_by_ref_fixes/+merge/210930>
>
> I think Cygwin should incorporate the specified patch file in its
> bash-completion package.

Great sleuthing, thank you very much.  Over to the bash maintainer,
please.

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: bash / readline problem with cd, directories with spaces, nospace
  2015-03-19 17:53     ` Henry S. Thompson
@ 2015-03-19 19:05       ` Eric Blake
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Blake @ 2015-03-19 19:05 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]

On 03/19/2015 11:37 AM, Henry S. Thompson wrote:
> George Prekas writes:
> 
>> On 23/02/2015 17:14, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:
> 
>>> I _think_ this is a regression, but my memory for this sort of thing
>>> is terrible.
>>> ...
> 
>> I had the same trouble as you describe and I was using your
>> workaround, but then I realized that find is broken in the same way.
>> So, I did some research and found out that Debian and Ubuntu have
>> solved this problem by patching /etc/bash_completion as described in
>> the following URLs:
>>
>> <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739835>
>>
>> <https://code.launchpad.net/~jjo/bash-completion/quote_readline_by_ref_fixes/+merge/210930>
>>
>> I think Cygwin should incorporate the specified patch file in its
>> bash-completion package.
> 
> Great sleuthing, thank you very much.  Over to the bash maintainer,
> please.

Yes, I'm overdue on pushing an updated bash-completion out...

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

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

end of thread, other threads:[~2015-03-19 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 17:34 bash / readline problem with cd, directories with spaces, nospace Henry S. Thompson
2015-02-23 17:42 ` Henry S. Thompson
2015-03-19 16:04   ` George Prekas
2015-03-19 17:53     ` Henry S. Thompson
2015-03-19 19:05       ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).