interpolation (aka command substitution)
Let's say I have a which command, I want to
$ which code
C:\Program Files (x86)\Microsoft VS Code\bin\code.cmd
$ echo "Here is your path to code: $(which code)"
Here is your path to code: C:\Program Files (x86)\Microsoft VS Code\bin\code.cmd
I don't think this is supported yet, but we may be able to add support for this without too much trouble.
@dthree we could probably solve this by looking for this pattern during pre parsing and recursively calling vorpal on the string, right? Or would the vorpal instance not be available there?
@khuongduybui very good point.
@nfischer I definitely want to add this, but then again I really, really want to add all of the bash functionality, and so adding this now would be double work.
I know I haven't been active recently on it, I've had no time. But trying to get some time soon.
I'll take a look and see how easy it is. If it's not too much, I think we can just add the feature now and reimplement with the full bash parser later on down the road
K awesome.
So I looked into this. We would essentially need to instantiate the preparser using the same vorpal instance. From there, the parsing is pretty simple. I can write something up for this. The only messy part is that we have to explicitly pass the vorpal instance around, or make the preparser an attribute of the vorpal instance.