[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MSVC 2.9.13 and path completion with spaces
From: |
John W. Eaton |
Subject: |
Re: MSVC 2.9.13 and path completion with spaces |
Date: |
Fri, 05 Oct 2007 01:47:32 -0400 |
On 4-Oct-2007, David Bateman wrote:
| What I have at the moment that isn't far off is the attached... It adds
| the missing leading quote and even completes into deep sub directories
| (if they arg is quoted). However it doesn't add the trailing quote
| character. I think this might be done with correct quoting and dequoting
| functions. I use the default readline ones in this patch but have
| written non working ones and the infrastructure to set them. However,
| although the trailing quote is added with the attached it messes up with
| things like
|
| cd ("Di<TAB>
|
| where "Dir One" is a directory. If I could just figure out how to add
| the trailing quote character correctly this would be prefer.
I tried the patch and the behavior I see for this is
cd ("Di<TAB>
is converted to
cd ('Dir One/
If there is a file in the directory, then another <TAB> results in
cd ('Dir One/two'"
(assuming there is a single file named "two" in the "Dir One"
directory). If the file is missing, then yes, the completion stops at
the / and does not append anything.
Using 0 instead of '"' in the call to set_completion_append_character
if (list_index >= file_index)
command_editor::set_completion_append_character ('\0');
seems to fix the problem with appending the double quote character.
Does that change cause other problems?
| If I replace pointed to by the third arg of rl_quote_func_t with a "'" then
| the attach seems to work correctly, except for things like
|
| cd ("Dir\ O<TAB>
|
| As it treats the \ as a character. This is fairly rare though. It
| however looses the ability to do deep sub directory completion..
|
| In any case with a little cleaning up this patch is already vastly
| better than what is there already for path completion.. Any suggestions
| how to add the trailing quote with this patch?
It's hard to believe there is no way to do this, but I don't see it.
Are there any readline experts we can ask for help?
| If not what is the best
| compromise? No trailing quote or no deep sub-directory completion?
Fow now, I think I'd prefer to be able to complete subdirectories.
Anyway, if you'd like, I think it is OK to check in the changes to the
command_editor class and associated functions in the oct-rl-edit.{h,c}
files but I'd prefer that you wait on the changes to input.cc.
Thanks,
jwe
- MSVC 2.9.13 and path completion with spaces, David Bateman, 2007/10/02
- Re: MSVC 2.9.13 and path completion with spaces, Michael Goffioul, 2007/10/02
- Re: MSVC 2.9.13 and path completion with spaces, David Bateman, 2007/10/02
- Re: MSVC 2.9.13 and path completion with spaces, David Bateman, 2007/10/03
- Re: MSVC 2.9.13 and path completion with spaces, John W. Eaton, 2007/10/03
- Re: MSVC 2.9.13 and path completion with spaces, David Bateman, 2007/10/03
- Re: MSVC 2.9.13 and path completion with spaces, John W. Eaton, 2007/10/03
- Re: MSVC 2.9.13 and path completion with spaces, Michael Goffioul, 2007/10/03
- Re: MSVC 2.9.13 and path completion with spaces, David Bateman, 2007/10/03
- Re: MSVC 2.9.13 and path completion with spaces,
John W. Eaton <=
- Re: MSVC 2.9.13 and path completion with spaces, David Bateman, 2007/10/05
- Re: MSVC 2.9.13 and path completion with spaces, John W. Eaton, 2007/10/05
- Re: MSVC 2.9.13 and path completion with spaces, David Bateman, 2007/10/07
- Re: MSVC 2.9.13 and path completion with spaces, David Bateman, 2007/10/07
- Re: MSVC 2.9.13 and path completion with spaces, John W. Eaton, 2007/10/08
- Re: MSVC 2.9.13 and path completion with spaces, David Bateman, 2007/10/08
- Re: MSVC 2.9.13 and path completion with spaces, John W. Eaton, 2007/10/08