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_generate fish: ArgEnum completions not working on toplevel command #2729

Closed
ModProg opened this issue Aug 20, 2021 · 4 comments
Closed
Labels
A-completion Area: completion generator C-bug Category: Updating dependencies E-easy Call for participation: Experience needed to fix: Easy / not much

Comments

@ModProg
Copy link
Contributor

ModProg commented Aug 20, 2021

Rust Version

rustc 1.54.0 (a178d0322 2021-07-26)

Clap Version

master

Minimal reproducible code

use clap::{ArgEnum, Clap, IntoApp};
use clap_generate::generators;

fn main() {
    clap_generate::generate::<generators::Fish, _>(
        &mut App::into_app(),
        "clap-issue",
        &mut std::io::stdout(),
    );
}

#[derive(Clap)]
struct App {
    #[clap(arg_enum)]
    arg: A,
}


#[derive(ArgEnum)]
enum A {
    A,
    B,
}

Steps to reproduce the bug with the above code

cargo run

Actual Behaviour

complete -c clap-issue -s h -l help -d 'Print help information'
complete -c clap-issue -s V -l version -d 'Print version information'

Expected Behaviour

complete -c clap-issue -s h -l help -d 'Print help information'
complete -c clap-issue -s V -l version -d 'Print version information'
complete -c clap-issue -r -f -a "a b"

Additional Context

No response

Debug Output

No response

@ModProg ModProg added the C-bug Category: Updating dependencies label Aug 20, 2021
@ModProg
Copy link
Contributor Author

ModProg commented Aug 20, 2021

I'll investigate if this also applies to other shells

@ModProg
Copy link
Contributor Author

ModProg commented Aug 20, 2021

Works in zsh so is only a fish issue

@epage
Copy link
Member

epage commented Aug 23, 2021

Thanks for reporting this!

@epage
Copy link
Member

epage commented Aug 10, 2024

As this shouldn't be a problem with rust-native completions, I'm closing this.

To track stabilization, see #3166

@epage epage closed this as completed Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion Area: completion generator C-bug Category: Updating dependencies E-easy Call for participation: Experience needed to fix: Easy / not much
Projects
None yet
Development

No branches or pull requests

3 participants