Does it mean that, a command starts with command name like --render and followed by arguments list separated by comma , and then a new command will start if a command name is appeared in the list like --render or --output?
When one calls TiddlyWiki from shell then there is no need for the separator , e.g
Hi @atronoush the shell command line processor parses the command line into individual tokens. The rules for doing so are quite complex, and often shell-specific, but the important thing is that the command line is parsed into a list of tokens. In JavaScript terms, Node.js gives us an array of the tokens that were provided at startup. That’s why commands sequences are represented in tiddlywiki.info as arrays of individual tokens.
Note that I’m not using quotation marks anywhere in there. I would if there were embedded spaces in any of the arguments. And they shouldn’t hurt if you do use them.
This is a sequence of two commands, each starting with a ---prefixed command name, and followed by some number of arguments.
The output command is passed a single argument, the string path/to/public/wiki, then the render command is passed the three string arguments $:/plugins/tiddlywiki/tiddlyweb/save/offline, index.html, and text/plain.
Note that these are stored in a JSON format inside tiddlywiki.info. That is where the commas and quotation marks come from. Tiddlywiki will use the JS data extracted from that JSON to build a shell command.
typical command-line syntax doesn’t do that. Even multi-line is somewhat tedious and error-prone (ending each line but the last one with a backslash.)
We could theoretically change to a syntax such as this:
We couldn’t easily allow additional spaces for readability. But even this would be difficult to do in a backward-compatible way.
In short, would it be possible? Probably. But it would involve lots of ugly work, and would be hard to get right.. and even then wouldn’t likely gain us much.