Skip to content

[Feature]: Replace readline with prompt_toolkit for command input and hints - #80

Merged
douxxtech merged 12 commits into
mainfrom
better_prompt
Jul 23, 2026
Merged

[Feature]: Replace readline with prompt_toolkit for command input and hints#80
douxxtech merged 12 commits into
mainfrom
better_prompt

Conversation

@douxxtech

Copy link
Copy Markdown
Member

Swaps input() + readline for prompt_toolkit in bw-local and bw-server. Also drops the manual log/prompt-redraw logic in logger.py in favor of prompt_toolkit's patch_stdout.

Additionally, the prompt now displays 2-steps hints:

  • first hint for the command name, starting to write se will suggest set
  • second hint for the command syntax, writing set will then show <key> <value> [immutable] as an hint.

Command history and validation has also been reimplemented, and fixed minor help bugs.

@douxxtech
douxxtech merged commit 352a469 into main Jul 23, 2026
@douxxtech
douxxtech deleted the better_prompt branch July 23, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant