summaryrefslogtreecommitdiffstats
path: root/vendor/clap_complete/src/shells
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/clap_complete/src/shells')
-rw-r--r--vendor/clap_complete/src/shells/bash.rs2
-rw-r--r--vendor/clap_complete/src/shells/fish.rs6
-rw-r--r--vendor/clap_complete/src/shells/powershell.rs4
3 files changed, 8 insertions, 4 deletions
diff --git a/vendor/clap_complete/src/shells/bash.rs b/vendor/clap_complete/src/shells/bash.rs
index 60e6b346c..2a97e1de2 100644
--- a/vendor/clap_complete/src/shells/bash.rs
+++ b/vendor/clap_complete/src/shells/bash.rs
@@ -58,7 +58,7 @@ impl Generator for Bash {
esac
}}
-complete -F _{name} -o bashdefault -o default {name}
+complete -F _{name} -o nosort -o bashdefault -o default {name}
",
name = bin_name,
cmd = bin_name.replace('-', "__"),
diff --git a/vendor/clap_complete/src/shells/fish.rs b/vendor/clap_complete/src/shells/fish.rs
index 5a069d35b..7dae5b6d6 100644
--- a/vendor/clap_complete/src/shells/fish.rs
+++ b/vendor/clap_complete/src/shells/fish.rs
@@ -168,10 +168,12 @@ fn value_completion(option: &Arg) -> String {
.filter_map(|value| if value.is_hide_set() {
None
} else {
+ // The help text after \t is wrapped in '' to make sure that the it is taken literally
+ // and there is no command substitution or variable expansion resulting in unexpected errors
Some(format!(
- "{}\t{}",
+ "{}\t'{}'",
escape_string(value.get_name(), true).as_str(),
- escape_string(&value.get_help().unwrap_or_default().to_string(), true)
+ escape_string(&value.get_help().unwrap_or_default().to_string(), false)
))
})
.collect::<Vec<_>>()
diff --git a/vendor/clap_complete/src/shells/powershell.rs b/vendor/clap_complete/src/shells/powershell.rs
index 417facf70..6b09b2e3a 100644
--- a/vendor/clap_complete/src/shells/powershell.rs
+++ b/vendor/clap_complete/src/shells/powershell.rs
@@ -124,7 +124,9 @@ fn generate_aliases(completions: &mut String, preamble: &String, arg: &Arg) {
for alias in aliases {
let _ = write!(
completions,
- "{preamble}'-{alias}', '{alias}', [CompletionResultType]::ParameterName, '{tooltip}')"
+ "{preamble}'-{alias}', '{alias}{}', [CompletionResultType]::ParameterName, '{tooltip}')",
+ // make PowerShell realize there is a difference between `-s` and `-S`
+ if alias.is_uppercase() { " " } else { "" },
);
}
}