Skip to content

cmd2 4.x MIgration - #224

Merged
jduin-cs merged 3 commits into
mainfrom
feature/cmd2-4x
Oct 30, 2026
Merged

jduin-cs merged 3 commits into
mainfrom
feature/cmd2-4x

Conversation

@ChristopherHammond13

Copy link
Copy Markdown
Member

This PR migrates us from a legacy build of cmd2 (in the 2.x range) to 4.x. Key highlights:

  • No more dependency on gnureadline, since cmd2 is prompt-toolkit-native now.
  • Nicer colours when typing commands, which make it easier to tell commands, args and params apart.

New version will be 3.7.0.

ChristopherHammond13 and others added 3 commits October 30, 2026 15:30
cmd2 4.x replaces readline with prompt-toolkit, so gnureadline and
pyreadline3 are no longer pulled in and the README workarounds for
unsupported readline builds are removed.

- Bump cmd2 to ^4.3.1 and prompt-toolkit to ^3.0.53 (cmd2's minimum)
- Pass the intro banner via Cmd.__init__, since cmd2 now overwrites
  self.intro during initialisation and the banner was silently lost
- Use DEFAULT_PROMPT rather than a prompt class attribute, for the same reason
- Set DEFAULT_CATEGORY so help lists RTR commands separately from
  cmd2's built-in commands
- Fix broken cmd2 scripting documentation links in the README

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
@jduin-cs
jduin-cs merged commit c7addde into main Oct 30, 2026
7 checks passed
@jduin-cs
jduin-cs deleted the feature/cmd2-4x branch October 30, 2026 19:58

This branch was successfully deployed

1 active deployment
code-quality — 77904e85 Deployed Oct 30, 2026 by ChristopherHammond13 via codequality (3.14) #292
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.

2 participants