Skip to content

Commit 1a7f84e

Browse files
committed
Document behaviour of the pty options in the usage screen
1 parent 4f85e3e commit 1a7f84e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,19 @@ func parseArguments() {
139139
If COMMAND is not set, spawn a shell on the host.
140140
141141
Accepted options:
142+
`
143+
const USAGE_FOOTER = `--
144+
145+
If neither pty option is passed, default to allocating a pseudo-terminal unless
146+
the command is known for misbehaving when attached to a pty.
147+
148+
For more details visit https://github.com/1player/host-spawn/issues/12
142149
`
143150

144151
flag.Usage = func() {
145152
fmt.Fprintf(os.Stderr, USAGE_PREAMBLE, os.Args[0])
146153
flag.PrintDefaults()
154+
fmt.Fprintf(os.Stderr, USAGE_FOOTER)
147155
os.Exit(0)
148156
}
149157

@@ -173,7 +181,7 @@ func main() {
173181
command = append([]string{basename}, os.Args[1:]...)
174182
}
175183

176-
// Lookup if this is a blacklisted program, where we won't enable pty.
184+
// Lookup if this is a blocklisted program, where we won't enable pty.
177185
allocatePty := !blocklist[command[0]]
178186
if *flagPty {
179187
allocatePty = true

0 commit comments

Comments
 (0)