Closed Gastove closed 9 years ago
We also need a way to denote special words that can be filled into the commands, environment vars maybe?
AH, right. Right right right. For instance:
: html-command [["make-some-html --basepath :url-root
i feel like we need something that isn't going to collide with possibly valid command syntax, which is why using environment vars and their syntax seemed to make sense. there may be a better solution, though
Yeah. I agree about collisions -- which is part of why I suggested keywords (like :url-root
). That said, I think usability is the most important part, since the server can accommodate whatever, and the syntax of env-vars is pretty well understood.
I think, as long as we can provide some guidance in the create/edit web view about how to write a correct command, we should be OK.
Will do a pass on the server parts of this later today.
At present, the "command" used by a tentacle is stored as a vector of pieces, with the "command" separate, like so:
There's a couple problems with this:
Proposal
Re-tool to using a single vector-of-vectors, like so:
A command with more-than-one step could go:
In the backend, we need to implement command splitting and chaining -- that is, each command-vector needs to be converted to a vector of words.