octave-maintainers
[Top][All Lists]
Advanced

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

Re: ls.m behavior


From: Tatsuro MATSUOKA
Subject: Re: ls.m behavior
Date: Thu, 1 Dec 2011 10:13:55 +0900 (JST)

Hello

I tried on MinGW>>  ls *.m
worked as expected.
But   
>>  system ("touch 'foo(1)bar'");
>>  ls foo(1)bar
The system cannot find the path specified.
error: ls: command exited abnormally with status 127

Regards

Tatsuro

--- On Thu, 2011/12/1, Ben Abbott  wrote:

> 
> On Nov 30, 2011, at 10:56 AM, Rik wrote:
> 
> > | | Anyone seeing this?
> > | |
> > | |     dir *.m
> > | |     go_crop.m    go_simple.m  go_test.m
> > | |     ls *.m
> > | |     ls: *.m: No such file or directory
> > | |     error: ls: command exited abnormally with status 1
> > 
> > | This is my fault, for introducing some quoting to try to allow things
> > | like
> > |
> > |   ls foo(1)bar
> > |
> > | to work.  I'm not sure what the best fix is, but it can't be as simple
> > | as what I did.
> > |
> > | jwe
> > 
> > What about the attached changeset which escapes anything which isn't an
> > ordinary word character or a special globbing character?  Using this
> > approach even the single quote is handled correctly.
> > 
> > I didn't escape the bracket characters [ ] because I think more people
> > would tend to use them as literal values rather than for globbing.  That is
> > one potential item to change.
> > 
> > --Rik
> > 
> > <ls.cset>
> 
> Works for me. I tried 
> 
>     ls *.m
> 
> and 
> 
>     system ("touch 'foo(1)bar'");
>     ls foo(1)bar
>     foo(1)bar
> 
> Both worked as expected.
> 
> Ben
>


reply via email to

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