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

MPW Command Reference


Adjust

Built-in

SYNTAX

Adjust selectionExpression [window] [-c count] [-l spaces]

DESCRIPTION

The Adjust command shifts the selected text to the right by one tab, without changing the indentation. Alternatively, you can move text lines a specific number of spaces to the left or right by using the -l option.

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

Adjust can return the following status codes:

0

at least one instance of the selection found

1

syntax error

2

another error

PARAMETERS

selectionExpression

Specifies the lines of text to be shifted. Selection expressions include regular expressions and certain MPW-specific symbols.

window

Specifies the window in which the text can be found. If you omit the window parameter, Adjust uses the target window.

OPTIONS

-c count

Shifts up to count instances of the selection to the right by one tab or by the number of spaces specified for the -l option. By default, Adjust assumes count is 1. Use the infinity character (∞) to shift all instances of the selection.

-l spaces

Shifts every line of text the specified number of spaces (not tabs) to the right or left. Shift text to the right by specifying a positive value for spaces. Shift text to the left by specifying a negative value.

EXAMPLES

Using the regular expression /Begin/, the following command line shifts every instance (-c ∞) of the string Begin in MyWindow to the right by one tab:

Adjust /Begin/ MyWindow -c ∞

The following command line shifts the lines containing the target selection (§ ) to the left by four spaces:

Adjust § -l -4

In the following example, the command line selects all lines between the next If and the following Else and shifts them to the right by one tab. This is repeated for four additional If… Else statements. Note: The character is Option-J.

Adjust /If/∆:∆/Else/ -c 5

SEE ALSO

Align

 
 


Last Updated July 2000