Before Command [B]

Qedit 5.7 for HP-UX

Home Previous Next


Before Command [B]

Repeat any combination of the previous 1,000 command lines, with or without editing.

BEFORE

[ start [ / stop ] ]

[ string ]

[ ALL | @ ]

(Default: redo previous line)

(BQ=redo without change)

(BJ=listredo)

The Before command allows you to modify the commands before it executes them. If you don't need to change them, use BQ or :Do. Commands are numbered sequentially, starting with 1 for the first command entered and, by default, the last 1,000 commands are accessible. This numbering sequence applies only to the temporary redo stack, because this stack is discarded when you exit Qedit. The numbering sequence in a persistent redo stack, which is accessible across Qedit invocations, continues between invocations. Use the :Listredo or BJ command to display the previous commands. You can redo a single command, a range of commands, or the most recent command whose name matches a string.

The Before command uses Qedit-style Control characters for modifying the commands. The default mode is to replace characters. To delete use Control-D, and to insert use Control-B. If you prefer HP-style modify (D, R, I, and U), use the :Redo command instead of Before, or do Set Modify HP.

Examples

/ls /users/obb                {"bob" is not spelled right}
/users/obb not found
/Before                       {redo most recent command}
ls /users/obb                 {last command is printed}
          bob                 {you enter changes to it}
ls /users/bob                 {the edited command is shown}
                              {you press Return}
/listredo -10/                {show last 10 commands}
/before 5                     {redo 5th command in stack}
/bef 8/10                     {redo 8th through 10th}
/b ls                         {redo last ls command}
/b @temp                      {redo last containing "temp"}
/before –2                    {redo command before previous}
/before -5/-2                 {redo by relative lines}

Notes

HP-UX reacts to certain control characters which might conflict with the Qzmodify codes. For example, control-D sends an end-of-file signal to HP-UX but is also the delete character in Qzmodify. You should use the HP-UX stty program to change the default end-of-file signal. Please see the section Control Characters and stty for more details.

If you wish to change any characters within the line, the modify operators are the regular Control Codes used in Qedit:

Any printing characters replace the ones above.

Control-D plus spaces deletes columns above.

Control-B puts you into "insert before" mode.

Control-A starts appending characters at the end of line.

Control-A, Control-D, plus spaces, deletes from the end.

Control-T ends Insert Mode, allowing movement to a new column.

Control-G recovers the original line.

Control-O specifies "overwrite" mode (needed for spaces).


Home Previous Next