clap-rs / clap

A full featured, fast Command Line Argument Parser for Rust
docs.rs/clap
Apache License 2.0
14.02k stars 1.03k forks source link

fish support for native completions #3917

Open epage opened 2 years ago

epage commented 2 years ago

See #3166 for more context

Tasks

ModProg commented 2 years ago

I wanted to start on this, looking at the current structure with bash, would it make sense to move the bash mod into a separate file, and could/should some of the bash code be reused instead of duplicated, and therefore extracted into a shared module for utils?

epage commented 2 years ago

I mostly kept it a single file for ease of prototyping. It will make sense to split it into another file. Please do that in a separate commit from other work so its easier to track whats going on

ModProg commented 1 year ago

Have the PR setup now for review. Still open things, especially in the handling of more complex functionality in handling parsing errors or arguments taking multiple values.

Also there might be some ways to unify code with claps actual parsing logic, but as I'm not familiar with it, I skipped that for now.

epage commented 1 year ago

Also there might be some ways to unify code with claps actual parsing logic, but as I'm not familiar with it, I skipped that for now.

Yeah, I hope to find a way to merge it one day but I figure its better for us to learn what is expected first

ModProg commented 1 year ago

Yeah, I hope to find a way to merge it one day but I figure its better for us to learn what is expected first

Yeah makes sense. There is probably also a bunch of parsing/error handling that can be skipped for completions.

ModProg commented 1 year ago