◐ Shell
clean mode source ↗

gh-133363: Fix Cmd completion for lines beginning with `! ` by godlygeek · Pull Request #133364 · python/cpython

When a line begins with `!` and there's no `do_shell` method defined,
`parsecmd` returns `None` as the `cmd`, which incorrectly leads to
`None` being concatenated to `complete_` and triggering a `TypeError`.

Instead, recognize `None` as a sentinel that means we should call
`completedefault`, as an empty string already is.

gaogaotiantian

gaogaotiantian

@godlygeek

gaogaotiantian

gaogaotiantian

gaogaotiantian

gaogaotiantian

diegorusso added a commit to diegorusso/cpython that referenced this pull request

May 4, 2025

Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request

Jul 12, 2025