Building a Shell for ghostty #5038
-
So I've been working on building a shell in Zig and looking to leverage ghostty. I've got basic command handling working, and working my way through the basic builtins, aliasing, expansions and so on. My goal is to get get it to being my daily driver, and then start expanding some features I have in mind. My hangup at the moment is getting TUI apps to run. I've done a couple of TUIs myself and my understanding was they talk to the terminal directly after setting the flags to raw and flipping to the alternate screen. But apparently there's more the parent proc has to do first. My question for @mitchellh - is this what libghostty is looking to solve? Is there code in ghostty already for handling this, or is the shell layer different from what the terminal needs to do to launch a TUI? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I dont think One thing that may help you though is the terminal inspector feature so you can see what your shell is sending to the terminal to see if there is any conflict from the standard |
Beta Was this translation helpful? Give feedback.
libghosty
is mean to be used as a core for other terminal emulator applications similar to VTE.Ie a terminal in the browser, or embedded into a text editor / ide like vscode
I dont think
libghostty
is doing to do what you are asking. If you are having issues getting a tui app to run I wouldnt expected ghostty to respond any different to launching a tui compared to other terminalsOne thing that may help you though is the terminal inspector feature so you can see what your shell is sending to the terminal to see if there is any conflict from the standard