The command should suport '*'
Project: | JNode Core |
Component: | Code |
Category: | feature request |
Priority: | normal |
Assigned: | Unassigned |
Status: | closed |
Jump to:
Description
I mean, if there are many files in a directory.
we do type
'del *'
to del all files in that directory.the cp command should also suport this feature.
- Login to post comments
liyj, has sent me a patch
Crawley, liyj has sent me a patch adressing the problem in the right place, the FileArgument. I would improve his solution and commit it if you are not working on the same thing.
Please commit liyj's patch if you can ...
As usual (), I've bitten off too big a chunk of work, and it is taking longer than I hoped.
(I'm trying to get command completion to work nicely in the context of command lines with '|', '<' and '>'. And this has significant repercussions for the existing command syntax parsing and completion mechanisms.
In hindsight, I think this was a mistake ...
See this discussion topic for why.
#1
IMO, it would be bad for specific commands to support "globing"; i.e. expansion of pathname wildcards. That approach places an unnecessary burden on the command implemention, and leads to inconsistencies in handling of file arguments. MSDOS and the various Windows batch languages illustrate this.
IMO, pathname wildcard expansion rightly belongs in the command shell.
We are actively working on the JNode shells. I'm reworking the existing JNode shell, and implementing a look-alike for the Bourne shell in Java. We also have "bsh" running, which provides JNode with an implementation of the Java scripting JSR.
Another idea is a shell that understands the JNode "command syntax" classes (Syntax, Argument, Parameter and so on) and does syntax sensitive globing, and other neat things. In fact, we have lots of opportunity for "green fields" user interface experimentation ... is people are interested.
#2
I close this bug since it is too unspecific and we have a (ongoing) discussion in the forum about wildcards.