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

Make command line GNU-compatible #2429

Merged
merged 88 commits into from
Jul 5, 2017
Merged

Make command line GNU-compatible #2429

merged 88 commits into from
Jul 5, 2017

Conversation

agross
Copy link
Contributor

@agross agross commented Jun 16, 2017

This is work in progress, hopefully to gather feedback.

I tried to change the command line to remove some nuisances when you're used to deal with other programs that use GNU-style arguments (e.g. paket add Castle.Windsor --group Main instead of paket add nuget Castle.Windsor group Main) and align the parameter style (--createnewbindingfiles -> --create-new-binding-files). The original issue is #1974.

On top of that I plan to provide zsh completion for all Paket commands. This is currently tracked in my dotfiles repo and will be updated alongside this PR.

Perhaps anyone experienced writing bash completions will chime in because I believe most people use bash. (e.g. Git for Windows)

All old-style arguments are still supported (e.g. for Ionide), but not advertised in the help text. Users will be warned when using the old style with hints how to resolve.

@baronfel
Copy link
Contributor

This is great, and I'm looking forward to this discussion.

One note: if providing completions for many shells is going to be difficult, it may be more efficient to create bash completions and then use zsh's bashcompinit funtion to allow zsh to use bash completions. Documentation for this feature can be found here

@agross
Copy link
Contributor Author

agross commented Jun 16, 2017

@baronfel Thanks for the suggestion. I'm not sure bash completion is as comprehensive as the zsh completion system (never wrote one, but I've been told zsh is superior to bash). Check some of the videos I created from the WIP here to see what's possible with zsh.

@matthid
Copy link
Member

matthid commented Jun 18, 2017

I'm not sure bash completion is as comprehensive as the zsh completion system

Isn't this another reason to consider the suggestion of @baronfel?
I'd rather change the cli now in a way that it works well in the most limited system rather than a second time later.

But whatever we decide I'm ok with this change if this means I can get auto completion or least it is easier to implement - as I'm using git bash... (though to be completely honest I like 'paket update group blub' which you haven't touched jet?)

@agross
Copy link
Contributor Author

agross commented Jun 18, 2017

Isn't this another reason to consider the suggestion of @baronfel?

Actually quite the opposite: As a zsh user I'd like best fidelity I can get. (A much better completion is one of the reasons I prefer zsh over bash.)

I'd rather change the cli now in a way that it works well in the most limited system rather than a second time later.

The CLI is changing right now and it'll be GNU-compatible which means bash will be able to complete it.

though to be completely honest I like 'paket update group blub' which you haven't touched jet?

I go through the commands in ascending order now, but I might implement paket update --group blubb first if you like.

@agross
Copy link
Contributor Author

agross commented Jun 25, 2017

FYI, I transferred all commits from my dotfiles repo to this PR. There's also a bash completion skeleton!

@forki
Copy link
Member

forki commented Jun 26, 2017

Wow. How much would we break?

@agross
Copy link
Contributor Author

agross commented Jun 26, 2017

No breaking changes until now!

@forki
Copy link
Member

forki commented Jun 26, 2017

So we could do a 5.5 alpha?

@agross
Copy link
Contributor Author

agross commented Jun 26, 2017

I'd say not yet because there are still 6 or 7 commands that I haven't touched.

@agross
Copy link
Contributor Author

agross commented Jun 26, 2017

@matthid Just pushed update ;-)

@agross
Copy link
Contributor Author

agross commented Jun 27, 2017

I'm done reworking the commands. The commands look a lot more like standard commands now, even if I say so myself. There's some docs left to review (everything that's not a command i.e. not generated from the --help output).

Looking forward to somebody testing this beyond CI!

If a zsh and Paket user reads this, please look no further than here.

@agross
Copy link
Contributor Author

agross commented Jun 28, 2017

I think I'm done. While reviewing the docs I fixed some links that led to 404s. Some I could not fix, e.g. the GitHub links from here.

You can run a local external link check using the new check-doc-links.sh shell script (requires node).

And the docs now have a favicon!

@agross agross requested review from forki and matthid June 28, 2017 14:59
@agross agross changed the title [WIP] Make command line GNU-compatible Make command line GNU-compatible Jun 28, 2017
@agross
Copy link
Contributor Author

agross commented Jun 29, 2017

If Argu releases fsprojects/Argu#84 we're all set. It's just a minor issue, though (--from-bootstrapper is displayed in the --help output despite being Hidden).

@forki
Copy link
Member

forki commented Jul 5, 2017

do we still need argu release?

@agross
Copy link
Contributor Author

agross commented Jul 5, 2017

The next Argu release will only remove the --from-bootstrapper parameter from the command help outputs of subcommands (paket add --help). Technically it's not required, but nice for cosmetic reasons.

@forki
Copy link
Member

forki commented Jul 5, 2017

Awesome work! Let's see how it works in alpha!

@forki forki merged commit 83a33be into fsprojects:master Jul 5, 2017
@agross
Copy link
Contributor Author

agross commented Jul 5, 2017

Thank you. That means a lot, coming from you. 🎉

@forki
Copy link
Member

forki commented Jul 5, 2017

giphy

Released in Paket 5.5.0-alpha005

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.

4 participants