Repository navigation
4.4.4 (2026-11-30)
What's Changed
- Bug Fixes
- Tab completion of a match which needs quotes, such as a file name with a space, now takes one press of Tab instead of two. The opening quote is inserted and the completion carries on in the same key press.
- A match chosen from the completion menu now closes its quote and adds a trailing space. Previously the quote was left open, and running the command failed with
Invalid syntax: No closing quotation. A directory still leaves its quote open so the rest of the path can be completed. See the Quotes Added by Completion documentation for details.Completions.allow_finalizationused to be ignored when there were several matches. It now decides whether a match chosen from them closes its quote. If you have written a completer which offers matches the user keeps completing, like directories, alongside other matches, returnallow_finalization=Falsefor those results so the quote stays open.
- On Windows, paths typed with forward slashes now complete properly. Shell command completion treats text such as
./myandC:/tools/myas a path instead of searchingPATHfor a command of that name. Path completion keeps the separators as they were typed, so the first Tab extends the part which several matching names share. history --output-fileandhistory --editnow write their files as UTF-8, which is whatrun_scriptreads. On a locale whose encoding is not UTF-8, such as Korean or Japanese Windows, a history with non-ASCII text was written in the locale's encoding.run_scriptthen rejected the saved file as not being ASCII or UTF-8 text, andhistory --editdid not run the edited commands.run_scriptnow skips a UTF-8 byte order mark at the start of a script file, which some Windows editors and Windows PowerShell 5.1 write. Previously the mark became part of the first command, so that command was not recognized.run_pyscriptnow reads a script the way Python does, instead of in the locale's encoding. It honors a byte order mark or a PEP 263 coding declaration, and otherwise reads the script as UTF-8. On a locale whose encoding is not UTF-8, a UTF-8 script with non-ASCII text used to fail withUnicodeDecodeErroror run with garbled strings. A script which cannot be decoded is now reported as an error reading the script file.- A script saved in another encoding, such as the locale's, now needs a coding declaration like
# -*- coding: cp949 -*-, as it does when Python runs it.
- A script saved in another encoding, such as the locale's, now needs a coding declaration like
- A window title set from another thread with
set_window_title()no longer interleaves with the drawing of a prompt-toolkit application which a command runs itself, such asprompt_toolkit.prompt()or the prompt of theipycommand. The title is now written on that application's event loop, as it already was forcmd2's own prompts. This applies when the application shares this app's terminal output and runs in theAppSessionwhich was current when theCmdwas created. - The
save_help_text.pyexample script now writes its output file as UTF-8. On a locale whose encoding is not UTF-8, it could fail withUnicodeEncodeErroron a character in the help text which that encoding lacks.
New Contributors
- @sogav21 made their first contribution in #1825
- @timothyanderson096-ocdealcheck made their first contribution in #1830
- @mrbuho-O made their first contribution in #1837
- @Alpenj made their first contribution in #1836
Full Changelog: 4.4.3...4.4.4