summaryrefslogtreecommitdiff
path: root/static/unix-v10/man1/=.1
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
commit97d5c458cfa039d857301e1ca7d5af3beb37131d (patch)
treeb460cd850d0537eb71806ba30358840377b27688 /static/unix-v10/man1/=.1
parentb89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff)
build: Better Build System
Diffstat (limited to 'static/unix-v10/man1/=.1')
-rw-r--r--static/unix-v10/man1/=.1123
1 files changed, 123 insertions, 0 deletions
diff --git a/static/unix-v10/man1/=.1 b/static/unix-v10/man1/=.1
new file mode 100644
index 00000000..509409e8
--- /dev/null
+++ b/static/unix-v10/man1/=.1
@@ -0,0 +1,123 @@
+.TH = 1
+.CT 1 shell
+.SH NAME
+=, ==, =p, ==p \- redo previous shell command
+.SH SYNOPSIS
+.B =
+[
+.I pattern
+]
+[
+.I substitution ...
+]
+.br
+.B ==
+[
+.I pattern
+]
+[
+.I substitution ...
+]
+.br
+.B =p
+[
+.I pattern
+]
+[
+.I substitution ...
+]
+.br
+.B ==p
+[
+.I pattern
+]
+[
+.I substitution ...
+]
+.SH DESCRIPTION
+The
+.I =
+command provides a simple history mechanism for the shell,
+.IR sh (1).
+The environment variable
+.BR HISTORY ,
+if set,
+names a file to which
+the shell appends the text of each command before execution.
+.I =
+searches the history file for the most recent
+command that matches the
+.I pattern,
+performs the
+.IR substitutions,
+and executes it.
+The
+.I pattern
+must agree with an initial substring of the original
+command except for variations in spacing.
+If no
+.I pattern
+is specified, the most recent command is selected.
+If no
+substitution
+is specified, the command is executed without modification.
+.PP
+.PP
+Substitutions have the form
+.IP
+.IB old = new
+.LP
+specifying that the string
+.I old
+in the command is to be replaced by
+.I new.
+Substitutions are made in order
+and operate on the first match.
+.PP
+The
+.I ==
+command is identical to
+.IR = ,
+but allows the substituted command to be edited before running.
+The command is printed,
+and a modification request is read from the terminal.
+Generally each character in the request specifies how to
+modify the character immediately above it:
+.TP
+.B #
+Delete the character.
+.PD 0
+.TP
+.B %
+Replace the character with a space.
+.TP
+.B ^
+Insert the rest of the request line before the character.
+.TP
+.B $
+Replace the characters in the command from this position on
+with the rest of the request line.
+.IP "space or tab"
+Leave the character(s) unchanged.
+.TP
+.B =
+Must be the first and only edit character.
+Back up to the next most recent
+match in the history file
+and try again.
+.IP "any other"
+This character replaces the one above it.
+.PD
+.PP
+If the request line is longer than the command,
+the overhang is appended to the command.
+.PP
+.I =p
+and
+.I ==p
+behave like
+.I =
+and
+.IR == ,
+except that they print the command on
+their standard output instead of executing it.