vtjnash / Glob.jl

Posix-compliant file name pattern matching
Other
125 stars 18 forks source link

Integrate with Cmd objects #29

Open zot opened 2 years ago

zot commented 2 years ago

This provides a @g_str macro that creates a Cmd object based on the interpolated contents. This allows absolute paths and uses pwd for the directory if the glob not absolute.

If these files exist: /tmp/a1, /tmp/a2, and /tmp/a3, then:

julia> import Glob.@g_str

julia> x="a"
"a"

julia> g"/tmp/$x*"
`/tmp/a1 /tmp/a2 /tmp/a3`