On Sun, Oct 16, 2011 at 10:52 PM, lolilolicon wrote:
> -- snip --
> I hope the above will help clarify what bash currently does, and how it's
> a bit crazy. I hope to discuss the correct behavior in each case later.
>
Below is the sane behavior I'd like to propose:
Inside an empty directory:
On Sun, Oct 16, 2011 at 9:52 AM, Chet Ramey wrote:
> On 10/15/11 10:34 AM, lolilolicon wrote:
>>
>> OK, some more strange test results.
>>
>> In the interactive bash shell, I did this (in an empty directory):
>>
>> $ mkdir 1\'1 $ mkdir 2@2
>> $ touch 1\'1/one $ touch 2@2/two
>>
On 10/15/11 10:34 AM, lolilolicon wrote:
> On Sat, Oct 15, 2011 at 1:30 AM, Chet Ramey wrote:
>> On 10/13/11 10:37 AM, lolilolicon wrote:
>>> Inside an empty directory:
>>>
>>> touch 1 1\'1
>>> complete -r ls
>>> ls 1\' # ls 1\'1
>>> complete -f ls
>>> ls 1\' # ls 1
>>> ls
On 10/15/11 2:05 AM, lolilolicon wrote:
> (Sorry, forgot to CC the ML.)
>
> On Sat, Oct 15, 2011 at 1:30 AM, Chet Ramey wrote:
>> Thanks for the report. This looks like a problem, or an omission, with
>> the effects of the `-f' option to complete, since it works as expected
>> without using prog
On Sat, Oct 15, 2011 at 10:34 PM, lolilolicon wrote:
>
>
> #!/bin/bash
>
> shopt -s progcomp
>
> mkdir -p 1\'1 2@2
> touch 1\'1/one 2@2/two
>
> for i in \
> "1'1" "1\'1" "1'1/" "1\'1/" \
> "2@2" "2\@2" "2@2/" "2\@2/"; do
> printf -- '%5s => %s\n' "$i" "$(compgen -f "$i")"
> done
>
On Sat, Oct 15, 2011 at 1:30 AM, Chet Ramey wrote:
> On 10/13/11 10:37 AM, lolilolicon wrote:
>> Inside an empty directory:
>>
>> touch 1 1\'1
>> complete -r ls
>> ls 1\' # ls 1\'1
>> complete -f ls
>> ls 1\' # ls 1
>> ls 1\\\' # ls 1\'1
>>
>> (Note: the comment on the
(Sorry, forgot to CC the ML.)
On Sat, Oct 15, 2011 at 1:30 AM, Chet Ramey wrote:
> Thanks for the report. This looks like a problem, or an omission, with
> the effects of the `-f' option to complete, since it works as expected
> without using programmable completion or when using `-o default'.
On 10/13/11 10:37 AM, lolilolicon wrote:
> Inside an empty directory:
>
> touch 1 1\'1
> complete -r ls
> ls 1\' # ls 1\'1
> complete -f ls
> ls 1\' # ls 1
> ls 1\\\' # ls 1\'1
>
> (Note: the comment on the right is the result after pressing )
>
> Is this broken behav