Blob


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