An experiment at a terminal controlled from a text editor. Kinda like shell mode/eshell from emacs. Because I cannot stand scrolling up/down/selecting text/etc. in a regular terminal.
screen-recording-2024-11-09-20-1731139880.mp4
^No dice on the nmtui, plus the color theme used is bad.
Load up the rc dir, then require the module. You should install kak-ansi if you want syntax highlighting, otherwise you'll see ANSI escape characters all over.
hook -once global KakBegin .* %{
require-module text-terminal
# Regex to match the end of your $PS1, this is the default value.
set-option global text_terminal_prompt_matcher ' \$ '
}
start-pty
# Hit <s-ret> to send whatever is after the matched prompt.
# -- or --
# Manually send keys.
send-to-pty 'keys'
- No bash history.
- No LSP in scratch buffers (so no autocomplete from bash-lsp) (restriction on kak-lsp side).
- No bash autocomplete.
- No handling of ctrl-c or similar.
- Would need some way to "inherit"/interact with the terminal so TUIs can be controlled / sudo password input.
- Can send input, e.g. sudo password, manually via
:send-to-pty "<keys>"<ret>
. However, inserting raw character seems to not work in the prompt.
- Can send input, e.g. sudo password, manually via
- ht
- oil shell headless
- Python's PTY module