1 .TH Concept "Command Syntax"
2 .NA Syntax "The Empire command syntax"
9 The Empire Shell (command interpreter)
10 expects input in the form:
11 .EX VERB ARG1 ARG2 ...
12 VERB is any one of the Empire commands on the \*Qcommand list\*U
13 (what you see when you type \*Qlist\*U-- e.g.
14 \*Qmap\*U, \*Qmove\*U, \*Qinfo\*U, etc).
16 The number of ARGs varies from command to command.
17 In most cases the ARGs need not be supplied on the command line;
18 any that are not supplied will be obtained by prompting.
19 The exception to this rule are those ARGs
20 that are enclosed in [square brackets]
22 The presence of these ARGs changes the way the command is carried out.
24 Certain basic argument types recur often and are abbreviated in the
28 <TYPE> ::= 'se', 'sh', 'l', or 'p' for sector, ship, land unit, or
29 plane respectively. If "sector" is not a possibility, then 's' will
30 likely suffice for "ship".
33 <CNUM/CNAME> ::= either a country number or a country name
36 <COMM> ::= any one, (or unambiguous abbreviation), of the list of
37 commodities found in \*Qinfo Selector\*U:
40 <LOAN> ::= loan number
43 <SECT> ::= sector coordinates in the form: x,y
47 <SECTS> ::= sector(s) in the form:
49 lox:hix,loy:hiy ?cond&cond&...
51 \*Qlox\*U, \*Qhix\*U, \*Qloy\*U, \*Qhiy\*U are coordinates bounding
52 the rectangular area to be considered
54 \*Qcond\*U is a condition of the form:
56 <VALUE><OPERATOR><VALUE>
58 <VALUE> is either a <COMM>, as above,
59 a number in the range 0 to 65536,
61 (\*Qm\*U for mine, \*Qc\*U for capital, etc), a type of unit
62 (\*Qfrigate\*U, \*Qcavalry\*U, etc), or a selector found in \*Qinfo
65 <OPERATOR> can be any one of:
77 Thus \*Qmob=100\*U, \*Qore#0\*U, \*Q7=guns\*U, \*Qciv#mil\*U,
78 \*Qdes=b\*U are examples of legitimate conditions,
79 (note lack of embedded spaces),
81 .EX census -3:3,-3:3 ?des=+&gun=5&mil>civ
82 will list all highways
83 within 3 of your capital
84 with exactly 5 guns and more military than civilians.
87 .EX deliver f -9:9,-9:9 ?f_del=0
88 will allow you to set up food delivery
89 in all the sectors that don't already
92 Note that \*Qhix\*U, \*Qhiy\*U, and \*Q?cond\*U are all optional.
93 Also, the entire \*Qlox:hix,loy:hiy\*U section may be replaced
94 by either \*Q#\*U, \*Q#0\*U, \*Q#1\*U, \*Q#2\*U,
95 or \*Q#3\*U, ... which refer to
96 \*Qrealm\*Us which you can define.
97 (See \*Qinfo realm\*U.)
98 Note that \*Q#\*U and \*Q#0\*U are equivalent. Also \*Q*\*U refers to
99 all sectors, and \*Q@x,y:dist\*U refers to all sectors within dist of x,y.
102 <SHIP> ::= one ship number
105 <FLEET> ::= fleet designation,
106 which may be a list of ships separated by slashes (`/'),
108 the character tilde (`~') which means all ships not in a specific fleet,
109 or a rectangular sector area.
112 <SHIP/FLEET> ::= either a single ship number or a fleet designation.
114 Note that <FLEET> specifications may have an optional ?cond&cond...
115 argument like that used for <SECTS> arguments.
117 .EX ship ~ ?des=d&mil>5
118 will list all destroyers that have more than 5 military
119 which are not currently in any fleet.
122 The output from commands may also be sent to a file or another
123 process by utilizing these alternate syntaxes:
126 .EX VERB ARG1 ... > FILE
127 which sends the output to the file \*QFILE\*U.
130 .EX VERB ARG1 ... >> FILE
131 which appends the output to the file \*QFILE\*U.
134 .EX VERB ARG1 ... >! FILE
135 which sends the output to the file \*QFILE\*U,
136 replacing the file it if it already exists.
139 .EX VERB ARG ... | PROGRAM [ARGS...]
140 which send the output of the command to the program \*QPROGRAM\*U
141 with optional arguments \*QARGS\*U.
142 This is most useful when \*QPROGRAM\*U is some type of
143 pager like \*(iFmore\*(pF(1) or \*(iFless\*(pF(1).
145 The Empire shell also recognizes a few control characters:
147 .in +\w'interrupt\0\0'u
151 Abort command and return to Empire command level
158 .SA "realm, Moving, Selector, Playing"