clap_complete generates invalid powershell code when docs have RIGHT_SINGLE_QUOTATION_MARK #5820
Open
2 tasks done
Labels
A-completion
Area: completion generator
C-bug
Category: Updating dependencies
E-help-wanted
Call for participation: Help is requested to fix this issue.
E-medium
Call for participation: Experience needed to fix: Medium / intermediate
Please complete the following tasks
Rust Version
rustc 1.81.0 (eeb90cda1 2024-09-04)
Clap Version
4.5.21
Minimal reproducible code
Steps to reproduce the bug with the above code
On Windows (PowerShell), run:
cargo run -- --shell powershell > bug.ps1
Then try to load this file:
Actual Behaviour
When trying to load the generated completion code, I get an exception because it's not properly escaping
’
.Expected Behaviour
clap_complete escapes
’
Additional Context
No response
Debug Output
The text was updated successfully, but these errors were encountered: