mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
fix(complete): Only use IFS between items
This commit is contained in:
parent
a574f226eb
commit
fe70fbc733
1 changed files with 4 additions and 2 deletions
|
@ -116,9 +116,11 @@ pub mod bash {
|
|||
)?;
|
||||
|
||||
let mut buf = Vec::new();
|
||||
for completion in &completions {
|
||||
for (i, completion) in completions.iter().enumerate() {
|
||||
if i != 0 {
|
||||
write!(&mut buf, "{}", args.ifs.as_deref().unwrap_or("\n"))?;
|
||||
}
|
||||
write!(&mut buf, "{}", completion.to_string_lossy())?;
|
||||
write!(&mut buf, "{}", args.ifs.as_deref().unwrap_or("\n"))?;
|
||||
}
|
||||
std::io::stdout().write(&buf)?;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue