dundalek / closh

Bash-like shell based on Clojure
Eclipse Public License 1.0
1.61k stars 65 forks source link

Glob not properly expanding in JVM version #158

Closed dundalek closed 4 years ago

dundalek commented 4 years ago

Running following from withing the closh source directory does not correctly expands (in JVM versin, nodejs version works fine).

cd src && echo ../*.json

We are using clj-glob library. Maybe we could try glob implementation provided by Java using FileSystem.getPathMatcher in combination with Files.walkFileTree.

Ideally I would like to see some programming language agnostic test suite, that could compare various implementations. One such format could be TAP protocol

There is an implementation in Julia which describes itself as POSIX spec compliant under IEEE Std 1003.1, 2004 Edition (Open Group Base Specifications Issue 6): https://github.com/vtjnash/Glob.jl

More resources: http://man7.org/linux/man-pages/man3/glob.3.html http://man7.org/linux/man-pages/man7/glob.7.html

kirillsalykin commented 4 years ago

@dundalek I've opened PR to address this issue https://github.com/dundalek/closh/pull/164.

Please review.

Some tests are still failing locally, looking into this.