Commit 5802f52
lif
Make the mechanism for escaping discoverable and customizable
This changes the method of entering an escape sequence:
- raw Ctrl+C gets sent to the VM unimpeded.
- by default, the sequence Ctrl+], Ctrl+C is used to quit the program
(`^]^C`)
- this can be customized or removed via CLI flags, allowing the string
be of arbitrary length.
- i.e. if you `propolis-cli serial -e "beans"` and then type "bea",
nothing gets sent to the VM after the "b" yet. and then if you type:
1. "k", the VM gets sent "beak"
2. '"ns", the VM doesn't get sent anything else, and the client
exits.
- the client can be configured to pass through an arbitrary prefix
length of the escape string before it starts suppressing inputs, such
that you can, for example, mimic ssh's Enter-tilde-dot sequence
without temporarily suppressing Enter presses not intended to
start an escape sequence, which would interfere with function:
`-e '^M~.' --escape-prefix-length=1` (this also works around ANSI
escape sequences being sent by xterm-like emulators when Enter is
pressed in a shell that sends a request for such)
Much of this logic, including RawTermiosGuard, has now been factored
out into the https://github.com/oxidecomputer/thouart crate.1 parent d96051d commit 5802f52
File tree
4 files changed
+115
-209
lines changed- bin/propolis-cli
- src
4 files changed
+115
-209
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments