mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
When completion functions are called in bash and zsh, quoted arguments
are passed exactly as they are typed, including shell quotes, and
clap_complete currently does not attempt to normalize this behavior.
For example, if the user types:
jj diff -f 'trunk()' <TAB>
std::env::args() will be equivalent to:
["jj", "diff", "-f", "'trunk()'", ""]
To accurately capture the revset, the quotes need to be stripped.
This workaround handles the most common cases that work consistently
across shells, rather than going for maximum accuracy.
|
||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| testing | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| docs | ||
| LICENSE | ||