clap icon indicating copy to clipboard operation
clap copied to clipboard

fish support for native completions

Open epage opened this issue 3 years ago • 6 comments

See #3166 for more context

Tasks

  • [x] #5048
  • [ ] Identify and resolve gaps with static completions

epage avatar Jul 13 '22 14:07 epage

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?

ModProg avatar Sep 02 '22 18:09 ModProg

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

epage avatar Sep 02 '22 18:09 epage

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.

ModProg avatar Oct 03 '22 11:10 ModProg

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

epage avatar Oct 03 '22 19:10 epage

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 avatar Oct 04 '22 10:10 ModProg

  • [ ] fish integration #5048
  • [ ] make globs in paths work with completion:
    • complete containing globs: */ba would complete to */bash.rs and */banana.rs (given the paths a/bash.rs, a/banana.rs, and b/bash.rs exist)
    • expand globs a-* would expand to a-b a-c.
    • complete substrings (not only prefixes) rc/he/ba would complete to src/shell/bash.rs.
  • [ ] only complete options if current argument starts with - or -- #5058
  • [ ] show help in completions #5056

ModProg avatar Jul 31 '23 18:07 ModProg