octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File separator on MinGW


From: John W. Eaton
Subject: Re: File separator on MinGW
Date: Wed, 27 Nov 2013 17:03:39 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

On 11/27/2013 04:56 PM, Rik wrote:
On 11/27/2013 01:26 PM, John W. Eaton wrote:
On 11/27/2013 02:54 PM, Rik  wrote:
 >> 11/27/13
 >>
 >> When I type 'ls bi<Tab>'  in a directory that has a subdirectory
"bin" the
 >> parser auto-completes to "bin/".  Shouldn't it be using the value of
 >> filesep() as the final character in the auto-complete? Where is that
code
 >> kept?
 >
 > I'm pretty sure it's readline that's doing that.  There are several
hook functions for dealing with directory name completion.  But since
Windows accepts either / or \ as the directory separator, I don't see
this as an urgent problem.
 >
 > jwe
 >

It's not urgent, but just because Windows accepts either separator
doesn't mean that Octave does as well.  I came across this because of
three instances, although there are more if you grep for filesep
comparisons in the scripts directory.

"ls bin/"  fails with
Invalid switch - "".
error: ls: command exited abnormally with status 127

because ls_command() on Windows is
dir /D

and

runtests dir_name/

also fails because it is looking for either a bare directory name or a
name with the appended filesep.

Finally,

what bin/
error: what: subscript indices must be either positive integers less
than 2^31 or logicals
error: called from:
error:   C:\Documents and Settings\Rik\My
Documents\Octave\octave-2013-11-27-09-34\share\octave\3.7.
7+\m\miscellaneous\what.m at line 36, column 7

All examples work if the correct Windows file separator is used.

OK, could you open a bug report about this problem and include those examples?

Thanks,

jwe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]