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

feat(Completions): one can generate a basic fish completions script at compile time #579

Closed
wants to merge 1 commit into from

Conversation

wdv4758h
Copy link
Contributor

As I've mentioned in #578 , I've made my first working fish completion. 😄

Things may work like this :

clap
clap0
clap1
clap2

@yo-bot
Copy link

yo-bot commented Jul 11, 2016

Thanks for the pull request, and welcome! The team is excited to review your changes, and you should hear from @sru (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@homu
Copy link
Contributor

homu commented Jul 23, 2016

☔ The latest upstream changes (presumably #570) made this pull request unmergeable. Please resolve the merge conflicts.

@kbknapp
Copy link
Member

kbknapp commented Jul 23, 2016

🎉 🎉

@wdv4758h Can you rebase onto the latest master? Then we can merge this awesomeness!

Thanks! 👍

…t compile time

The following completion would happen (using example 17_yaml.rs):

```
$ prog <tab>
help subcmd
```

```
$ prog -<tab><tab>
--help  -h                            (Prints help information)
--max-vals      (you can only supply a max of 3 values for me!)
--min-vals  (you must supply at least two values to satisfy me)
--mode                   (shows an option with specific values)
--mult-vals        (demos an option which has two named values)
--option  -o                (example option argument from yaml)
--version  -V                      (Prints version information)
-F                                         (demo flag argument)
```

```
$ prog --<tab><tab>
--help  -h                            (Prints help information)
--max-vals      (you can only supply a max of 3 values for me!)
--min-vals  (you must supply at least two values to satisfy me)
--mode                   (shows an option with specific values)
--mult-vals        (demos an option which has two named values)
--option  -o                (example option argument from yaml)
--version  -V                      (Prints version information)
```

```
$ prog --mode <tab>
emacs  (shows an option with specific values)  vi  (shows an option with specific values)
```

```
$ prog subcmd -<tab>
--help  -h        (Prints help information)  -B  (example subcommand option)
--version  -V  (Prints version information)
```

```
$ prog subcmd --<tab>
--help  (Prints help information)  --version  (Prints version information)
```

Close clap-rs#578
@wdv4758h
Copy link
Contributor Author

@kbknapp Done. Please review again 😃

@kbknapp
Copy link
Member

kbknapp commented Jul 28, 2016

Looks great! Thanks again 👍

@homu r+

@homu
Copy link
Contributor

homu commented Jul 28, 2016

📌 Commit 1979d2f has been approved by kbknapp

@homu
Copy link
Contributor

homu commented Jul 28, 2016

⌛ Testing commit 1979d2f with merge d145546...

@homu
Copy link
Contributor

homu commented Jul 28, 2016

☀️ Test successful - status

@homu
Copy link
Contributor

homu commented Jul 28, 2016

👀 Test was successful, but fast-forwarding failed: 422 Required status check "continuous-integration/appveyor/pr" is expected

@kbknapp kbknapp mentioned this pull request Jul 28, 2016
@kbknapp
Copy link
Member

kbknapp commented Jul 28, 2016

Will be merged with #605 (@wdv4758h still got credit for the commit, just merged with latest master 😉)

@kbknapp kbknapp closed this Jul 28, 2016
homu added a commit that referenced this pull request Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants