Docs for the named command parameters

I'd be grateful if anyone with sufficient Windows experience could confirm that the note about double quotes in "NamedCommandParameters" is correct.
This commit is contained in:
Jermolene 2018-06-26 13:36:13 +01:00
parent 6f8711d469
commit 43b64fc2ca
3 changed files with 32 additions and 7 deletions

View file

@ -0,0 +1,20 @@
created: 20180626122427188
modified: 20180626123549204
tags: [[Using TiddlyWiki on Node.js]]
title: NamedCommandParameters
type: text/vnd.tiddlywiki
<<.from-version "5.1.18">> Most TiddlyWiki [[Commands]] use a position-based system for their parameters where each parameter must be listed in the precise order defined by the command. Some of the more complex commands offer an alternative scheme of named command parameters. For example, here we provide two parameters named "port" and "host":
```
--listen port=8090 host=0.0.0.0
```
Using special characters within a parameter requires quoting. Unix, Linux and the Mac use single quotes, and Windows uses double quotes:
```
--listen port=8090 username=joe 'password=s3cret(!'
--listen port=8090 username=joe "password=s3cret(!"
```
Note that the quotes are applied to the entire name=value pair, not just to the value part.

View file

@ -1,8 +1,9 @@
created: 20150117174359000
modified: 20150117205257000
title: Commands
modified: 20180626122309578
tags: Concepts Reference
title: Commands
type: text/vnd.tiddlywiki
A <<.def command>> is one of the following words, written with a `--` prefix and used as a command-line option to [[TiddlyWiki on Node.js]], indicating which action is desired.
A <<.def command>> is one of the following words, written with a `--` prefix and used as a command-line option under Node.js, indicating which action is desired. See [[Using TiddlyWiki on Node.js]] for details of how to use them.
<<list-links "[tag[Commands]]">>

View file

@ -1,10 +1,10 @@
created: 20131219100520659
modified: 20140920135025757
modified: 20180626122347768
tags: [[TiddlyWiki on Node.js]]
title: Using TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles.
TiddlyWiki5 includes a set of [[Commands]] for use on the command line to perform an extensive set of operations based on TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles.
For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in static HTML:
@ -22,6 +22,10 @@ The commands and their individual arguments follow, each command being identifie
tiddlywiki [<wikipath>] [--<command> [<arg>[,<arg>]]]
```
The available commands are:
<<.from-version "5.1.18">> Commands such as the ListenCommand that support large numbers of parameters can use NamedCommandParameters to make things less unwieldy. For example:
<<list-links "[tag[Commands]]">>
```
tiddlywiki wikipath --listen username=jeremy port=8090
```
See [[Commands]] for a full listing of the available commands.