blob: a6ccb632098916fd0f3169a0347f6046309f7ea6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Process monitoring, end to end. A terminal whose tty is held by a
# full-screen program is not somewhere a command line may be typed: the SAME
# Exec from that terminal goes into its shell while it sits at its prompt,
# and into a command pane of its own once `less` owns the terminal -- where
# it runs, instead of becoming keystrokes the pager would eat. Nothing about
# the pager's screen changes. (From any pane but a terminal, an Exec always
# runs as a command pane: exec.snap and cmdword.snap.)
lines big.txt 40
start 31 210 -n 1
wait 8000 big.txt
stable 700 20000
snap opened
# at the prompt: a command word in the terminal's own tag, executed, is
# typed into its shell. `:` opens the tag, `A` appends, and the execute key
# runs the word under the cursor.
key :
key A
key space
text @`echo TAKEN''ONE`
key esc
settle 100
key h
key tab
wait 10000 TAKENONE
stable 700 20000
snap at-prompt
# ...and now a pager owns that terminal. Ctrl-b is raw tty
# (config.tty_toggle), which is how a script types AT the shell instead of
# into the pane's own edit buffer.
key c-b
stable 400 5000
text env LESS= less big.txt
key enter
wait 10000 line 1
stable 700 20000
key c-b
stable 400 5000
snap paging
# the same gesture from that terminal: a command pane, not `less` keystrokes
key :
key A
key space
text @`echo TAKEN''TWO`
key esc
settle 100
key h
key tab
wait 10000 TAKENTWO
stable 700 20000
snap spawned
|