prompt, spaces, `cd' and system commands..
Roland Illig
roland.illig at gmx.de
Wed Dec 1 00:45:02 UTC 2004
Here is my suggestion for a patch. Assuming you have a directory called
"test ", here are the strings that work [+] and the ones that don't
work [-]. I have put a $ to mark the end of the strings.
[-] cd test$
[-] cd test $
[-] cd test $
[+] cd test $
[+] cd test \ $
[+] cd test\ \ $
[+] cd test\ \ $
[+] cd "test "$
[+] cd "test " $
[+] cd 'test '$
[+] cd 'test ' $
The only surprising ones are in line 3 and 4. This is the trailing space
issue that appears when you insert the current file using C-enter.
I casted some arguments to (const char *) to make clear that those
functions will not modify the string. If you find that these casts make
the code too unreadable, please tell me.
Roland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mc-cd-with-spaces.patch
Type: text/x-patch
Size: 3548 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20041201/8198607b/attachment.bin>
More information about the mc-devel
mailing list