Skip to content

losnappas/text-file-terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

text-file-terminal

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.

Usage

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'

Missing features / bugs

  • 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.

Alternative art

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published