Our great sponsors
-
Rich Interactive Widgets for Terminal UIs
Terminal UI library with rich, interactive widgets — written in Golang
-
tcell
Tcell is an alternate terminal package, similar in some ways to termbox, but better in others.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
It is not clear exactly how you are doing this, but I'm going to guess you are printing to the terminal and then reading from it. The short answer is that what you are asking for is impossible with that technique. You need a library that implements it, because it requires a whole lot of obscure knowledge that is largely a waste of time to obtain when you can outsource it to a library. I've used tview successfully. tcell provides a lower level interface that tview is built on top of that does more exactly the thing you're asking, but redoing your app entirely in terms of tview is probably a good idea.
It is not clear exactly how you are doing this, but I'm going to guess you are printing to the terminal and then reading from it. The short answer is that what you are asking for is impossible with that technique. You need a library that implements it, because it requires a whole lot of obscure knowledge that is largely a waste of time to obtain when you can outsource it to a library. I've used tview successfully. tcell provides a lower level interface that tview is built on top of that does more exactly the thing you're asking, but redoing your app entirely in terms of tview is probably a good idea.
Related posts
- I need CTRL + A (Select all) command on the cmd
- shell-reader - an easy-to-use library for creating shells for the Linux terminal with support for navigating command history
- Which Go frameworks are recommended to assist with the creation of console based UI and GUI?
- Just ordered the C2 as my first mechanical keyboard
- The Best Keyboard Shortcuts for Bash