blob: 475548761e6f78a285722a282d8b0052a5406a98 (
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
|
# Process monitoring, end to end. A pane whose tty is held by a full-screen
# program is not somewhere a command line may be typed: the SAME middle-drag
# Exec goes into the shell while it sits at its prompt, and into a NEW shell
# beside it once `less` owns the terminal — where it runs, instead of becoming
# keystrokes the pager would eat. Nothing about the pager's screen changes.
file cmd.txt echo TAKEN''ONE\necho TAKEN''TWO
lines big.txt 40
start 31 210 -n 1
wait 8000 cmd.txt
stable 700 20000
# open the command file by looking its name in the greeting `ls`
press right 14 5
release right 14 5
wait 10000 echo TAKEN
stable 700 20000
snap opened
# at the prompt: the drag runs in the shell that is already on this directory
press middle 8 4
drag middle 22 4
release middle 22 4
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 — the same way exec.snap runs a command line.
press left 150 9
release left 150 9
stable 400 5000
key c-b
stable 400 5000
text env LESS= less big.txt
key enter
wait 10000 line 1
stable 700 20000
snap paging
# the same gesture on the second line: a new shell, not `less` keystrokes
press middle 8 5
drag middle 22 5
release middle 22 5
wait 10000 TAKENTWO
stable 700 20000
snap spawned
|