Bram Moolenaar wrote:
> I wrote:
> 
>> Tony Mechelynck wrote:
>>
>>> Bram Moolenaar wrote:
>>>> A couple of problems were detected when the Unix shell is used to expand
>>>> file names containing characters such as a single quote.  This applies
>>>> to completion on the command line and glob().
>>>>
>>>> I made a patch that defines a function to echo each file name
>>>> separately.  Inspired by a patch that Dasn made, but staying on the safe
>>>> side.
>>>>
>>>> The patch for ex_docmd.c changes detecting the end of the file name when
>>>> doing command line completion.  This specifically fixes a file name
>>>> containing "&".
>>>>
>>>> Please try it out and let me know if there are any new problems.
>>>>
>>> OK, here are a few more results, with *errors*
>>>
>>> 1. (Ben Schmidt; I confirm) With the patch, after (in bash)
>>>
>>>     touch "It's good"
>>>     touch "It's bad"
>>>     touch "It's ugly"
>>>
>>> then, in Vim, command-line completion only works if I don't try to do 
>>> completion after typing (or entering via a previous completion) a part-name 
>>> which includes an apostrophe:
>>>
>>>     :e I<Tab>
>>>
>>> allows to select from the 'wildmenu' BUT
>>>
>>>     :e It\'s\ g<Tab>
>>>
>>> fails with a beep
>>>
>>>
>>> 2. After editing those files, a Session file is created in error by 
>>> ":mksession", giving "E77: Too many files" when reloading with the -S 
>>> option.
>>>
>>> Examination of the session script shows lines such as
>>>
>>>     badd +1 It's\ good
>>>     badd +1 It's\ bad
>>>     badd +0 It's\ ugly
>>>
>>> where the quote is NOT backslash-escaped.
>> It appears it all works fine when 'shell' is "sh", but not when it is
>> "bash".  What is the difference between "sh" and "bash" considering
>> single quotes?
> 
> My fault.  It has nothing to do with bash itself, just that "bash" is
> four characters and "sh" is two :-).  I'm glad this was tested before
> sending it out!
> 
> Here is a replacement patch that should deal with "bash" as with "sh":
> 
> 
> *** ../vim-7.1.202/src/os_unix.c      Thu Jan  3 18:55:21 2008
> --- src/os_unix.c     Fri Jan  4 18:23:04 2008

No patch here for ex_docmd.c

I suppose this patch is a replacement for the part of the previous one dealing 
with os_unix.c but that the part dealing with ex_docmd.c should be kept?

Best regards,
Tony.
-- 
"I am not now, and never have been, a girlfriend of Henry Kissinger."
                -- Gloria Steinem


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui