As per my last email, I now use glob() to scan all the files in a directory.

1. The \\ bug is finally gone.
There is no trouble reading the contents of a directory a\b

2. The entries are already sorted,
I can remove the code that I wrote to sort them.

3. I can set a flag to show hidden files.
This use to require two calls to wordexp, for * and .*,
then merging the results.

4. There are only 5 literals to protect from glob: \ * ? [ ]
Combine this with the above and the code is simpler and more predictable.

This does not require me to replace wordexp with glob in the expansion of a 
filename.
They are separate capabilities.
However, encouraged by this early success,
I will probably do it, because file expansion
will also be free of the \\ bug, and will be free of all that silly escaping
that I would have to do every time I use it,
like the example in my documentation
$phones/at\&t
There would be no need for the backslash here, just write filenames intuitively.

Karl Dahlke
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to