28.2. Passing options and arguments
Passing options and arguments to your commands is very similar to many CLI commands in an *nix environment.
Options are prefixed with a
- and can contain one or more options.
Some options expect a value to be associated with it.
Arguments are string values which aren’t prefixed with
Let’s look at
ls as an example:
ls -r -f KNOWS:out -v 12345 will make a verbose listing of node
12345's outgoing relationships of type
The node id,
12345, is an argument to
ls which tells it to do the listing on that node instead of the current node (see
However a shorter version of this can be written:
ls -rfv KNOWS:out 12345. Here all three options are written together after a single
f is in the middle it gets associated with the
The reason for this is that the
ls command doesn’t expect any values associated with the
So, it can infer the right values for the rights options.