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

Conversation

Projects
None yet
4 participants
@agross
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@baronfel

baronfel Jun 16, 2017

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

Contributor

baronfel commented Jun 16, 2017

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

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jun 16, 2017

Contributor

@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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid Jun 18, 2017

Member

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?)

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

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jun 18, 2017

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jun 25, 2017

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jun 26, 2017

Member

Wow. How much would we break?

Member

forki commented Jun 26, 2017

Wow. How much would we break?

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jun 26, 2017

Contributor

No breaking changes until now!

Contributor

agross commented Jun 26, 2017

No breaking changes until now!

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jun 26, 2017

Member

So we could do a 5.5 alpha?

Member

forki commented Jun 26, 2017

So we could do a 5.5 alpha?

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jun 26, 2017

Contributor

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

Contributor

agross commented Jun 26, 2017

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

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jun 26, 2017

Contributor

@matthid Just pushed update ;-)

Contributor

agross commented Jun 26, 2017

@matthid Just pushed update ;-)

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jun 27, 2017

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jun 28, 2017

Contributor

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!

Contributor

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 Jun 28, 2017

@agross agross changed the title from [WIP] Make command line GNU-compatible to Make command line GNU-compatible Jun 28, 2017

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jun 29, 2017

Contributor

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).

Contributor

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).

agross added some commits Jun 25, 2017

Remove unneeded commands from completion
* fix-nuspecs is a temporary command to work around .NET Core issues
* same applies for generate-nuspec
Some arguments had special arity
e.g. paket generate-load-scripts groups took a list of groups and now needs
several --group arguments with one group each
Fix one test that verified that generate-load-scripts parses the scri…
…pt type itself, which is now handled by Argu
Fix links to PRs in release notes
If you link like (http://example.com) the link will get an additional ")" at the end and lead to 404s for our users
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jul 5, 2017

Member

do we still need argu release?

Member

forki commented Jul 5, 2017

do we still need argu release?

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jul 5, 2017

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jul 5, 2017

Member

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

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

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jul 5, 2017

Contributor

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

Contributor

agross commented Jul 5, 2017

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

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jul 5, 2017

Member

giphy

Released in Paket 5.5.0-alpha005

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