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 -d OUTGOING -v 12345
will make a verbose listing of node 12345
's relationships which have the direction OUTGOING
. 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 pwd
command). However a shorter version of this can be written:
ls -rdv OUTGOING 12345
. Here all three options are written together after a single -
prefix. Even though the d
is in the middle it gets associated with the OUTGOING
value. The reason for this is that the ls
command doesn’t expect any values associated with the r
or v
options, hence it can infer that the OUTGOING
value refers the d
option.
Copyright © 2010 Neo Technology