Blob
1 .TH WINTEXT 12 .SH NAME3 wintext, ", "" \- access text in current window4 .ds x \C'"'5 .ds xx \C'"'\^\^\^\^\C'"'6 .ds y \*x\7 .ds yy \*(xx\8 .SH SYNOPSIS9 .B wintext10 .br11 .B \*x\12 [13 .I prefix14 ]15 .br16 .B \*(xx\17 [18 .I prefix19 ]20 .SH DESCRIPTION21 .I Wintext22 prints the text of the current23 .I win24 (see25 .IR acme (1))26 or27 .IR 9term (1)28 window to standard output.29 .PP30 .I \*y31 searches the window text for commands typed with a particular prefix32 and prints them, indented, to standard output.33 .I Prefix34 is a regular expression that is matched against the beginning of the command-line.35 If36 .I prefix37 is omitted,38 .I \*y39 prints the last command executed.40 .I \*(yy41 prints the last command that42 .I \*y43 would print and then executes it by piping it into44 .IR rc (1).45 .PP46 Both47 .I \*y48 and49 .I \*(yy50 identify commands in the window text by looking for lines51 beginning with a shell prompt.52 Prompts are assumed to be an unindented sequence of53 non-whitespace characters followed by one of the54 characters55 .BR % ,56 .BR ; ,57 .BR $ ,58 or59 .BR # .60 .SH EXAMPLES61 Print the62 .IR ls (1)63 and64 .I lc65 commands executed in this window:66 .IP67 .EX68 .ta +4n69 % \*x 'l[sc]'70 % ls -l /tmp/qq*71 # ls -lrt /etc72 % lc r*73 %74 .EE75 .PP76 Execute the most recent77 .I lc78 command again:79 .IP80 .EX81 .ta +4n82 % \*(xx lc83 % lc r*84 ramfs rc read rio rm85 %86 .EE87 .SH SEE ALSO88 .IR 9term (1),89 .IR acme (1)90 .SH SOURCE91 .B \*9/bin92 .SH BUGS93 .I \*y94 and95 .I \*(yy96 are hard to type in shells other than97 .IR rc (1).98 .\" and in troff!