Blob
1 .TH WINTEXT 12 .SH NAME3 wintext, ", "" \- access text in current window4 .SH SYNOPSIS5 .B wintext6 .br7 .B \C'"'\8 [9 .I prefix10 ]11 .br12 .B \C'"'\C'"'\13 [14 .I prefix15 ]16 .SH DESCRIPTION17 .I Wintext18 prints the text of the current19 .I win20 (see21 .IR acme (1))22 or23 .IR 9term (1)24 window to standard output.25 .PP26 .I \C'"'27 searches the window text for commands typed with a particular prefix28 and prints them, indented, to standard output.29 .I Prefix30 is a regular expression that is matched against the beginning of the command-line.31 If32 .I prefix33 is omitted,34 .I \C'"'35 prints the last command executed.36 .I \C'"'\C'"'37 prints the last command that38 .I \C'"'39 would print and then executes it by piping it into40 .IR rc (1).41 .PP42 Both43 .I \C'"'44 and45 .I \C'"'\C'"'46 identify commands in the window text by looking for lines47 beginning with a shell prompt.48 Prompts are assumed to be an unindented sequence of49 non-whitespace characters followed by one of the50 characters51 .BR % ,52 .BR ; ,53 .BR $ ,54 or55 .BR # .56 .SH EXAMPLES57 Print the58 .IR ls (1)59 and60 .I lc61 commands executed in this window:62 .IP63 .EX64 .ta +4n65 % \C'"' 'l[sc]'66 % ls -l /tmp/qq*67 # ls -lrt /etc68 % lc r*69 %70 .EE71 .PP72 Execute the most recent73 .I lc74 command again:75 .IP76 .EX77 .ta +4n78 % \C'"'\C'"' lc79 % lc r*80 ramfs rc read rio rm81 %82 .EE83 .SH SEE ALSO84 .IR 9term (1),85 .IR acme (1)86 .SH SOURCE87 .B \*9/bin88 .SH BUGS89 .I \C'"'90 and91 .I \C'"'\C'"'92 are hard to type in shells other than93 .IR rc (1).94 .\" and in troff!95 .PP96 Don't run97 .I \C'"'\C'"'98 twice in a row.