Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


Align

Built-in

SYNTAX

Align selectionExpression [window] [-c count]

DESCRIPTION

The Align command positions all lines within the selection the same distance from the left margin as the first line.

INPUT

None

OUTPUT

None

ALIAS RESOLUTION

A partial pathname or a pathname containing Finder aliases may be substituted for the window name so long as the pathname specifies the name of an open window. Note that using a shell variable to designate a window is usually faster than requiring MPW to resolve a Finder alias.

STATUS

Align can return the following status codes:

0

at least one instance of the selection found

1

syntax error

2

any other error

PARAMETERS

selectionExpression

Specifies the lines of text to be aligned.

window

Specifies the window in which the text can be found. If you omit the window parameter, Align defaults to the target window.

OPTIONS

-c count

Aligns up to count instances of the selection. By default, Align assumes count is 1. Specify the infinity symbol (∞) for count to align all instances of the selection.

EXAMPLES

The following command line performs the same function as the Align menu item; that is, it aligns all lines in the target selection (§) with the first line of the selection.

Align §

The regular expression in the following command line selects everything from the next Begin through the following End, causing Align to align all lines within the first Begin…End statement it finds to the same margin position as the line that contains Begin.

Align /Begin/:/End/

To align more than one Begin…End statement in the same manner, you can specify a count using the -c option.

SEE ALSO

Adjust

 
 


Last Updated July 2000