Replies: 2 comments
-
For interactive TUI applications like that, you could use mordant, which powers clikt, or mosaic. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Those libraries look nice! But they’re unrelated to what I’m asking. I don’t need any fancy TUI rendering. What I need is
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to make a tool with an interactive mode: if you give the essential args but no subcommand, it will prompt you for a subcommand line, execute it, then prompt again, until you use Ctrl-D or a “quit” subcommand to exit. This is very useful to avoid having to repeat prerequisite args like a database name or URL.
SQLite's
sqlite3
tool is a perfect example of this.clikt doesn’t seem to support this. I’m sure I can implement it myself, but speaking from experience — I've done this in C++ — there are various annoying bits like finding a ‘readline’ library with decent editing, and then having to split the command line into arguments (including handling quotes).
So I’m hoping someone has built a tool like this and I can look at its source code … ?
Beta Was this translation helpful? Give feedback.
All reactions