Open casey opened 3 years ago
I like this idea. I'm a bit worried about having to re-implement bash
's expansion behavior.
I think there are crates for most of these things:
~
expansion and variable interpolation.)Brace expansion is the craziest, and there's no crate for that.
One nice thing is that these things could all be tested against bash
itself, to make sure that they behave the same.
There are some kinds of string expansion that the shell does that it would be nice to support. They're very different features, but they all fall into the category of "modify this string in some useful way", so I thought I'd put them all in the same issue.
They could be supported separately, but it might also be useful to have something that does all the expansions you might want, in a reasonable order, with a single helper. Like
Expand("~/$SRC/**/*.rs")
. The reasonable order is probably whatever bash does.Globs
It would also be nice to support
**
globs:Variable interpolation
Tilde expansion
Brace expansion