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