Skip to content

gh-133351: Fix Cmd completion for lines beginning with ! - #133362

Closed
godlygeek wants to merge 1 commit into
python:mainfrom
godlygeek:fix_cmd_bang_completion
Closed

gh-133351: Fix Cmd completion for lines beginning with ! #133362
godlygeek wants to merge 1 commit into
python:mainfrom
godlygeek:fix_cmd_bang_completion

Conversation

@godlygeek

@godlygeekgodlygeek commented May 4, 2025

Copy link
Copy Markdown
Contributor

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.

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.
@godlygeek

Copy link
Copy Markdown
ContributorAuthor

Actually, let me close this and open a new issue for it, since this probably deserves a real news entry unrelated to PDB...

@gaogaotiantian

Copy link
Copy Markdown
Member

You can just change the gh issue number.

@godlygeek

Copy link
Copy Markdown
ContributorAuthor

Too late, I wasn't sure so I opened #133364 😓

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@godlygeek@gaogaotiantian