JoshMcguigan / shell_completion

Write shell completion scripts in pure Rust
Apache License 2.0
133 stars 6 forks source link

higher level API #4

Closed JoshMcguigan closed 5 years ago

JoshMcguigan commented 5 years ago

Currently, the API exposed by shell_completion is very low level. Many goals of this crate will require the design and implementation of a higher level API.

This is a request for proposals for the shape of the public API of shell_completion. All ideas are welcome, and they don't have to be fully baked. Even something as simple as "I wish there was a method that does X" is useful feedback.

JoshMcguigan commented 5 years ago

Hackernews user chubot suggested reviewing the [shellac protocol proposal] for API inspiration.

$ git --git-dir . a<TAB>

{ "SHELLAC_ARGV": ["git", "--git-dir", ".", "a"]
  "SHELLAC_ARGV_INDEX": 3,
  "SHELLAC_CHAR_INDEX": 1,
}

I'm going to move forward with a trait modeled after this protocol proposal.

JoshMcguigan commented 5 years ago

Closing as #6 takes care of this in the short term. Feel free to create a new issue to suggest any changes or additions.