plan9port/man/man1/wintext.1

101 lines
1.4 KiB
Groff
Raw Normal View History

2005-01-03 06:40:20 +00:00
.TH WINTEXT 1
.SH NAME
wintext, ", "" \- access text in current window
2005-01-13 04:49:19 +00:00
.ds x \C'"'
.ds xx \C'"'\^\^\^\^\C'"'
.ds y \*x\^
.ds yy \*(xx\^
2005-01-03 06:40:20 +00:00
.SH SYNOPSIS
.B wintext
.br
.B \*y
2005-01-03 06:40:20 +00:00
[
.I prefix
]
.br
.B \*(yy
2005-01-03 06:40:20 +00:00
[
.I prefix
]
.SH DESCRIPTION
.I Wintext
prints the text of the current
.I win
(see
.MR acme (1) ),
.MR 9term (1) ,
2005-01-03 06:40:20 +00:00
or
(Unix's)
.MR tmux (1)
2005-01-03 06:40:20 +00:00
window to standard output.
.PP
2005-01-13 04:49:19 +00:00
.I \*y
2005-01-03 06:40:20 +00:00
searches the window text for commands typed with a particular prefix
and prints them, indented, to standard output.
.I Prefix
is a regular expression that is matched against the beginning of the command-line.
If
.I prefix
is omitted,
2005-01-13 04:49:19 +00:00
.I \*y
2005-01-03 06:40:20 +00:00
prints the last command executed.
2005-01-13 04:49:19 +00:00
.I \*(yy
2005-01-03 06:40:20 +00:00
prints the last command that
2005-01-13 04:49:19 +00:00
.I \*y
would print and then executes it by piping it into
.MR rc (1) .
2005-01-03 06:40:20 +00:00
.PP
Both
2005-01-13 04:49:19 +00:00
.I \*y
2005-01-03 06:40:20 +00:00
and
2005-01-13 04:49:19 +00:00
.I \*(yy
2005-01-03 06:40:20 +00:00
identify commands in the window text by looking for lines
beginning with a shell prompt.
Prompts are assumed to be an unindented sequence of
non-whitespace characters followed by one of the
characters
.BR % ,
.BR ; ,
.BR $ ,
or
.BR # .
.SH EXAMPLES
Print the
.MR ls (1)
2005-01-03 06:40:20 +00:00
and
.I lc
commands executed in this window:
.IP
.EX
.ta +4n
2005-01-13 04:49:19 +00:00
% \*x 'l[sc]'
2005-01-03 06:40:20 +00:00
% ls -l /tmp/qq*
# ls -lrt /etc
% lc r*
%
.EE
.PP
Execute the most recent
.I lc
command again:
.IP
.EX
.ta +4n
2005-01-13 04:49:19 +00:00
% \*(xx lc
2005-01-03 06:40:20 +00:00
% lc r*
ramfs rc read rio rm
%
2005-01-03 06:40:20 +00:00
.EE
.SH SEE ALSO
.MR 9term (1) ,
.MR acme (1)
2005-01-03 06:40:20 +00:00
.SH SOURCE
2005-01-11 17:37:33 +00:00
.B \*9/bin
2005-01-03 06:40:20 +00:00
.SH BUGS
2005-01-13 04:49:19 +00:00
.I \*y
2005-01-03 06:40:20 +00:00
and
2005-01-13 04:49:19 +00:00
.I \*(yy
2005-01-03 06:40:20 +00:00
are hard to type in shells other than
.MR rc (1) .
2005-01-03 06:40:20 +00:00
.\" and in troff!