Skip to content

Improve autocompleter and command parsing in relation to quoting#2139

Merged
jubalh merged 2 commits intomasterfrom
fix/1844
Apr 2, 2026
Merged

Improve autocompleter and command parsing in relation to quoting#2139
jubalh merged 2 commits intomasterfrom
fix/1844

Conversation

@jubalh
Copy link
Copy Markdown
Member

@jubalh jubalh commented Mar 30, 2026

Fix #1844

jubalh added 2 commits March 29, 2026 00:15
Implement backslash based escaping in the command parser and autocompletion
logic to handle contact names containing double quotes.
This stops the parser from splitting nicknames into multiple tokens, which
previously caused "Invalid usage" errors.

The parser now sees \ as an escape character for quotes and spaces in
_parse_args_helper, count_tokens and get_start. Autocomplete results are
escaped when they contain spaces, and search prefixes are unescaped before
matching. strip_arg_quotes() has also been updated to handle unescaping.

Fixes: #1844
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Unescape any character following a backslash. This fixes autocompletion
for names with escaped spaces.
For example: `/msg Thor\ Odinson hello`

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
@jubalh jubalh added this to the 0.18.0 milestone Mar 30, 2026
@jubalh jubalh changed the title Improve autocompleter Improve autocompleter and command parsing in relation to quoting Mar 30, 2026
@jubalh
Copy link
Copy Markdown
Member Author

jubalh commented Apr 1, 2026

Anybody ready to review this?

@jubalh jubalh merged commit b56498a into master Apr 2, 2026
9 checks passed
@jubalh jubalh deleted the fix/1844 branch April 2, 2026 10:32
Sign up for free to 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.

Double quote in contact name breaks auto-complete

1 participant