Blob


1 .TH WINTEXT 1
2 .SH NAME
3 wintext, ", "" \- access text in current window
4 .SH SYNOPSIS
5 .B wintext
6 .br
7 .B \C'"'\
8 [
9 .I prefix
10 ]
11 .br
12 .B \C'"'\C'"'\
13 [
14 .I prefix
15 ]
16 .SH DESCRIPTION
17 .I Wintext
18 prints the text of the current
19 .I win
20 (see
21 .IR acme (1))
22 or
23 .IR 9term (1)
24 window to standard output.
25 .PP
26 .I \C'"'
27 searches the window text for commands typed with a particular prefix
28 and prints them, indented, to standard output.
29 .I Prefix
30 is a regular expression that is matched against the beginning of the command-line.
31 If
32 .I prefix
33 is omitted,
34 .I \C'"'
35 prints the last command executed.
36 .I \C'"'\C'"'
37 prints the last command that
38 .I \C'"'
39 would print and then executes it by piping it into
40 .IR rc (1).
41 .PP
42 Both
43 .I \C'"'
44 and
45 .I \C'"'\C'"'
46 identify commands in the window text by looking for lines
47 beginning with a shell prompt.
48 Prompts are assumed to be an unindented sequence of
49 non-whitespace characters followed by one of the
50 characters
51 .BR % ,
52 .BR ; ,
53 .BR $ ,
54 or
55 .BR # .
56 .SH EXAMPLES
57 Print the
58 .IR ls (1)
59 and
60 .I lc
61 commands executed in this window:
62 .IP
63 .EX
64 .ta +4n
65 % \C'"' 'l[sc]'
66 % ls -l /tmp/qq*
67 # ls -lrt /etc
68 % lc r*
69 %
70 .EE
71 .PP
72 Execute the most recent
73 .I lc
74 command again:
75 .IP
76 .EX
77 .ta +4n
78 % \C'"'\C'"' lc
79 % lc r*
80 ramfs rc read rio rm
81 %
82 .EE
83 .SH SEE ALSO
84 .IR 9term (1),
85 .IR acme (1)
86 .SH SOURCE
87 .B \*9/bin
88 .SH BUGS
89 .I \C'"'
90 and
91 .I \C'"'\C'"'
92 are hard to type in shells other than
93 .IR rc (1).
94 .\" and in troff!
95 .PP
96 Don't run
97 .I \C'"'\C'"'
98 twice in a row.