robertdfrench / git-pr

Pull requests without Git(Hub|Lab)
GNU General Public License v3.0
0 stars 1 forks source link

Tab Completion Modules? #53

Open robertdfrench opened 2 years ago

robertdfrench commented 2 years ago

How does tab completion work, and can we support it? RipGrep uses clap to automatically generate tab completion files for some shells:

    // Use clap to build completion files.
    let mut app = app::app();
    app.gen_completions("rg", Shell::Bash, &outdir);
    app.gen_completions("rg", Shell::Fish, &outdir);
    app.gen_completions("rg", Shell::PowerShell, &outdir);
    // Note that we do not use clap's support for zsh. Instead, zsh completions
    // are manually maintained in `complete/_rg`.

Zsh-specific

robertdfrench commented 2 years ago

58 hints at unifying the subcommands into a single binary, which would make clap-generated tab completion much easier.