Skip to content

Commit

Permalink
fix: remove quotes in zsh descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Oct 12, 2024
1 parent 36b527f commit dba5fd8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cli/src/cli/complete_word.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ impl CompleteWord {
match (any_descriptions, shell) {
(true, "bash") => println!("{c}"),
(true, "fish") => println!("{c}\t{description}"),
(true, "zsh") => println!("{c}\\:'{description}'"),
(true, "zsh") => {
// TODO: figure out how to properly escape single quotes
let description = description.replace("'", "");
println!("{c}\\:'{description}'")
}
_ => println!("{c}"),
}
}
Expand Down Expand Up @@ -94,6 +98,7 @@ impl CompleteWord {
}
choices
};
trace!("choices: {}", choices.iter().map(|(c, _)| c).join(", "));
Ok(choices)
}

Expand Down

0 comments on commit dba5fd8

Please sign in to comment.