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

[clap_complete] Missing newline character for zsh completion at the end #3273

Closed
2 tasks done
xylous opened this issue Jan 9, 2022 · 1 comment
Closed
2 tasks done
Labels
C-bug Category: Updating dependencies

Comments

@xylous
Copy link
Contributor

xylous commented Jan 9, 2022

Please complete the following tasks

  • I have searched the discussions
  • I have searched the existing issues

Rust Version

rustc 1.57.0 (Arch Linux rust 1:1.57.0-1)

Clap Version

3.0.5

Minimal reproducible code

use clap::App;
use clap_complete::{generate, shells::Zsh};
use std::io;

fn main() {
    let mut app = App::new("myapp")
        .subcommand(App::new("test").subcommand(App::new("config")))
        .subcommand(App::new("hello"));

    generate(Zsh, &mut app, "myapp", &mut io::stdout());
}

Steps to reproduce the bug with the above code

cargo run

Actual Behaviour

When the command is ran, there's no newline character at the end of the output

Expected Behaviour

There should be a newline character at the end of the output, like how there is on all other completions' outputs

Additional Context

No response

Debug Output

No response

@xylous xylous added the C-bug Category: Updating dependencies label Jan 9, 2022
@xylous
Copy link
Contributor Author

xylous commented Jan 9, 2022

I created a pull request to solve this issue, #3275

To be fair, it isn't hard to solve.

@epage epage closed this as completed Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Updating dependencies
Projects
None yet
Development

No branches or pull requests

2 participants