-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Make sure you completed the following tasks
- Searched the discussions
- Searched the closed issues
Code
Steps to reproduce the issue
N/A
Version
name = "clap"
version = "2.33.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"
dependencies = [
"bitflags",
"strsim",
"textwrap",
"unicode-width",
]
Actual Behavior Summary
https://github.com/BurntSushi/ripgrep generated _rg.ps1 does not complete -S correctly. It only completes -s.
Expected Behavior Summary
See BurntSushi/ripgrep#1690 for details.
. _rg.ps1
rg -s<Ctrl-Space> completes rg -s. It should produce:
rg -s
s S
Search case sensitively (default).
A simple fix would be to change ListItemText for 'S' to 'S '. The space makes ListItemText unique, which is all that's needed.
Additional context
A simple fix may be to test for upper case and append a space. I don't know rust, so a PR is beyond me.
| "'-{}', '{}', {}, '{}')", |
| "'-{}', '{}', {}, '{}')", |
For example, change the second '{}' to '{} ' in the format! below after adding a check for upper case. Sorry I can't be more helpful.
if let Some(short_aliases) = option.get_visible_short_aliases() {
for data in short_aliases {
completions.push_str(&preamble);
completions.push_str(
format!(
"'-{}', '{} ', {}, '{}')",
data, data, "[CompletionResultType]::ParameterName", tooltip
)
.as_str(),
);
}
}
}
Debug output
N/A