diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-06-22 16:20:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-22 16:20:39 -0700 |
| commit | 0721955dde45bbb53c0af25eea503b825935bb1b (patch) | |
| tree | 9b642493eae778037babbf4459a3edf577e67220 /include | |
| parent | 8573d53fe69a1d43c32924c284234c49f2701d1c (diff) | |
| parent | 1947afade94ccfd24f49c7efe8aeac735eb08061 (diff) | |
`input` configuration to pass input as stdin on startup (#7652)
This adds a new configuration `input` that allows passing either raw
text or file contents as stdin when starting the terminal.
The input is sent byte-for-byte to the terminal, so control characters
such as `\n` will be interpreted by the shell and can be used to run
programs in the context of the loaded shell. After the input is sent, it
switches to `stdin` as usual.
Example: `ghostty --input="hello, world\n"` will start the your default
shell, run `echo hello, world`, and then show the prompt
The `--input` configuration can be repeated to send multiple data
concatenated directly to together. Values can be also be prefixed with
`file:` to send a file contents, e.g. `file:data.txt`. File contents are
limited to 10MB to prevent excessive memory usage and avoid malicious
use. Beyond that, users should write their own script...
This is all in pursuit of #7647, but we're not there yet.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
