|
|
|
|
|
by rwmj
5027 days ago
|
|
Because that's how MS-DOS used to work, and it was dumb. It means every program has to do globbing (or often, didn't do globbing). In any case, bash does get this right: ls * will pass the correct filenames to the ls program no matter what the filenames contain. Also quotes around variable expansions can cope with any characters. |
|
So what? If the primary API used by command-line applications to open files does the globbing, then programs will have to go out of their way to not glob. And you'll get the added benefit that globs will only be applied to arguments that are actually meant to specify filenames. There would be none of this escaping "*" when you pass it to "find."
> In any case, bash does get this right: ls will pass the correct filenames to the ls program no matter what the filenames contain.
That doesn't solve the problem; your filename could be called "--help."