Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix fish shell completion bug that occurs when ValueEnum is the only one #5143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions clap_complete/src/shells/fish.rs
Expand Up @@ -171,13 +171,13 @@ fn value_completion(option: &Arg) -> String {
// 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(), false)
))
})
.collect::<Vec<_>>()
.join(",")
.join("")
)
} else {
// NB! If you change this, please also update the table in `ValueHint` documentation.
Expand Down