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 \Q*command 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:
39 <LOAN> ::= loan number
41 <SECT> ::= sector coordinates in the form: x,y
44 <SECTS> ::= sector(s) in the form:
46 lox:hix,loy:hiy ?cond&cond&...
48 \*Qlox\*U, \*Qhix\*U, \*Qloy\*U, \*Qhiy\*U are coordinates bounding
49 the rectangular area to be considered
51 \*Qcond\*U is a condition of the form:
53 <VALUE><OPERATOR><VALUE>
55 <VALUE> is either a <COMM>, as above,
56 a number in the range 0 to 65536,
58 (\*Qm\*U for mine, \*Qc\*U for capital, etc), a type of unit
59 (\*Qfrigate\*U, \*Qcavalry\*U, etc), or a selector found in \*Qinfo
62 <OPERATOR> can be any one of:
74 Thus \*Qmob=100\*U, \*Qore#0\*U, \*Q7=guns\*U, \*Qciv#mil\*U,
75 \*Qdes=b\*U are examples of legitimate conditions,
76 (note lack of embedded spaces),
78 .EX census -3:3,-3:3 ?des=+&gun=5&mil>civ
79 will list all highways
80 within 3 of your capital
81 with exactly 5 guns and more military than civilians.
84 .EX deliver f -9:9,-9:9 ?f_del=0
85 will allow you to set up food delivery
86 in all the sectors that don't already
89 Note that \*Qhix\*U, \*Qhiy\*U, and \*Q?cond\*U are all optional.
90 Also, the entire \*Qlox:hix,loy:hiy\*U section may be replaced
91 by either \*Q#\*U, \*Q#0\*U, \*Q#1\*U, \*Q#2\*U,
92 or \*Q#3\*U, ... which refer to
93 \*Qrealm\*Us which you can define.
94 (See \*Qinfo realm\*U.)
95 Note that \*Q#\*U and \*Q#0\*U are equivalent. Also \*Q*\*U refers to
96 all sectors, and \*Q@x,y:dist\*U refers to all sectors within dist of x,y.
98 <SHIP> ::= one ship number
100 <FLEET> ::= fleet designation,
101 which may be a list of ships separated by slashes (`/'),
103 the character tilde (`~') which means all ships not in a specific fleet,
104 or a rectangular sector area.
106 <SHIP/FLEET> ::= either a single ship number or a fleet designation.
108 Note that <FLEET> specifications may have an optional ?cond&cond...
109 argument like that used for <SECTS> arguments.
111 .EX ship ~ ?des=d&mil>5
112 will list all destroyers that have more than 5 military
113 which are not currently in any fleet.
117 The output from commands may also be sent to a file or another
118 process by utilizing these alternate syntaxes:
121 .EX VERB ARG1 ... > FILE
122 which sends the output to the file \*QFILE\*U.
125 .EX VERB ARG1 ... >> FILE
126 which appends the output to the file \*QFILE\*U.
129 .EX VERB ARG1 ... >! FILE
130 which sends the output to the file \*QFILE\*U,
131 replacing the file it if it already exists.
134 .EX VERB ARG ... | PROGRAM [ARGS...]
135 which send the output of the command to the program \*QPROGRAM\*U
136 with optional arguments \*QARGS\*U.
137 This is most useful when \*QPROGRAM\*U is some type of
138 pager like \*(iFmore\*(pF(1) or \*(iFless\*(pF(1).
140 The Empire shell also recognizes a few control characters:
142 .in +\w'interrupt\0\0'u
146 Abort command and return to Empire command level
153 .SA "realm, Move, Selector, Playing"