[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function |
Date: |
Thu, 21 Apr 2022 15:15:29 -0400 (EDT) |
Follow-up Comment #33, bug #62282 (project octave):
I checked in a small change to the wording of the documentation for ls and dir
(http://hg.savannah.gnu.org/hgweb/octave/rev/0acf9363da34) that was slightly
better to my native English-speaking ear.
However, I now have a question about how well this the escape patterning is
working on both Windows and Linux.
For Windows, the escaping of regular expressions is
## Exclude glob patterns and escaped characters from quoted part of
## FILENAMES string
args = regexprep (args, '(?<!\\)([*?])', '"$1"');
args = regexprep (args, '(?<!\\)\[', '"[');
args = regexprep (args, '(?<!\\)\[', ']"');
args = regexprep (args, '(\\.)', '"$1"');
It doesn't look to me like this handles the case of ']'. Could someone test
this on Windows?
# In a shell
touch 'abc]def'
# In octave
ls abc\]def
Second question is how escaped characters are supposed to behave on Linux. I
did this
# In a shell
touch 'abc?def'
touch 'abc*def'
touch 'abc[def'
In Octave when I try
octave:1> ls abc\?def
ls: cannot access 'abc\?def': No such file or directory
error: ls: command exited abnormally with status 2
However, that same syntax in the shell works just fine. So I think there is
something wrong on Linux platforms as well.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62282>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, (continued)
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Markus Mützel, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Markus Mützel, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Liang Tang, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Markus Mützel, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Markus Mützel, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Liang Tang, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Liang Tang, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Markus Mützel, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Markus Mützel, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Liang Tang, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function,
Rik <=
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Dmitri A. Sergatskov, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Liang Tang, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Rik, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Rik, 2022/04/21
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Markus Mützel, 2022/04/22
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Rik, 2022/04/22
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Liang Tang, 2022/04/22
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Markus Mützel, 2022/04/22
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Liang Tang, 2022/04/22
- [Octave-bug-tracker] [bug #62282] ls command in 7.1.0 may not function, Markus Mützel, 2022/04/22