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

Replace all historic boolean arguments with all current args #49

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

verhovsky
Copy link
Contributor

@verhovsky verhovsky commented Aug 1, 2021

This PR adds all of curl's arguments as they appear in curl's source code right now, as well as allowing shortening of arguments like curl does, so for example you can pass --ur instead of --url (--u doesn't work because there's more than one option that starts with --u). I added handling of --. Unknown arguments now cause errors.

I ended up deleting the arguments that have been deleted from curl, so if someone is copying in an old curl command they may get an "Unknown flag" error. I'm working on adding all the deleted arguments as well.

@@ -92,7 +92,7 @@ $(function()

// Fill in examples
$('#example1').click(function() {
$('#input').val('curl canhazip.com').keyup();
$('#input').val('curl icanhazip.com').keyup();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the correct URL

https://major.io/2021/06/06/a-new-future-for-icanhazip/

https://github.com/major/icanhaz

Looking at whois, it looks like they're both on cloudflare but I don't know if they're actually run by the same person, the shortened form isn't mentioned on any blog posts.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember how I found it or why I used it, but I think someone recommended it to me... if I recall it was an obscure reason...

Sorry, been busy; will try to look at this when I can.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, they both just return your IP as plaintext

$ curl icanhazip.com
2607:<REDACTED>
$ curl canhazip.com
2607:<REDACTED

most likely the guy registered the shortened form after making icanhazip. I just noticed that it's technically not the official URL and figured we should use the proper one.

@verhovsky verhovsky changed the title Add more arguments Replace all historic boolean arguments with all current args Aug 26, 2021
@verhovsky verhovsky marked this pull request as ready for review August 26, 2021 07:02
@verhovsky verhovsky force-pushed the all-args branch 4 times, most recently from ca7fbd4 to 57fe049 Compare August 28, 2021 16:21
@verhovsky verhovsky force-pushed the all-args branch 2 times, most recently from 0a898a5 to 5b89f01 Compare September 2, 2021 08:02
@mholt
Copy link
Owner

mholt commented Sep 2, 2021

Thanks for working on this. Sorry I haven't been able to review it yet. Been busy preparing for a conference I'm speaking at next week, so it might be a while yet.

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.

2 participants