# /recall

Usage:

/RECALL [-wworld] [-ligv] [-t[format]] [-aattrs] [-mstyle] [-An] [-Bn] [-Cn] [#]range [pattern]

Recalls lines from a history buffer. Only one of the [-ligw] options can be used, to specify the history from which to recall.

Options:

-w
  recall from current world's history (default)
-wworld
  recall from world's history
-l
  recall from local history (i.e., TF output)
-g
  recall from global history (all worlds, and local)
-i
  recall from input history
-t[format]
  display timestamps on each line, using format. If format is omitted, "`[%{time_format}]`" will be used. The format is described in ftime().
-v
  recall lines that don't match the pattern
-q
  quiet: suppress the header and footer lines
-aattr
  suppress specified attributes (e.g., -ag shows gagged lines)
-mstyle
  matching style (simple, glob, or regexp).
-An
  Print n lines of context after each matching line.
-Bn
  Print n lines of context before each matching line.
-Cn
  Equivalent to -An -Bn.
#
  display line numbers (must be last option, before range)

range can have one of the formats below. If x and y are plain integers, they are interpreted as line numbers or counts. If they have the form "hours:minutes" or "hours:minutes:seconds", they are interpreted as time values (either a period of time, or a clock time within the last 24 hours). If they are real numbers (with up to 6 decimal places), they are interpreted as absolute system times.

/x
  Recall the last x matching lines.
x
  Recall from the last x lines, or lines within the last time period x.
x-y
  Recall lines starting with x and ending with y.
-y
  If y is a line number, recall the yth previous line; if y is a time, recall lines earlier than y. Remember to use "-" before "-y" so it isn't interpreted as an option.
x-
  Recall lines after x.

If range is prefixed with "#", line numbers will be displayed.

If pattern is given, only lines in the given range that match pattern will be recalled. The matching style is determined by the -m option if given, %{matching} otherwise.

If the output of /recall is being sent to the screen, it will be preceded by "`================ Recall start ================`" and follwed by "`================= Recall end =================`" unless -q is used. These lines will not be produced if the output is redirected, for example with $(...) command substitution or "/quote `/recall". When -A, -B, or -C is used, groups of lines that are not adjacent in history will be separated by "`--`".

If lines are received while tf is suspended (by ^Z or /suspend) or in a subshell (by /sh), the timestamps on the lines will correspond to the time tf resumed control, not the time they actually arrived.

The return value of /recall is the number of lines that were actually recalled.

Because the output of /recall may clutter the current window, you may wish to use /limit instead.

#### Examples

These examples assume that `matching=glob` (the default).

Recall every line beginning with "Kite whispers" that arrived in the last hour:
  `/recall 1:00 Kite whispers*`
Recall every line that arrived between 11 am and 1 pm:
  `/recall 11:00-13:00`
Recall the last 5 lines containing "spam":
  `/recall /5 *spam*`

See: history, attributes, /limit, /quote, %time_format

Back to index
Back to tf home page

Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004 Ken Keys