Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
This implements the --help me if you can by Daniel Fandrich presented at curl-up 2020. See here.
I split up curl into 22 categories:
It works through a bitmask. Because of this every item can contain multiple categories.
Please see this PR as two parts. One documentation part and one technical part.
Of course everyone is most welcome to do his review, I would still like a review from @bagder on the selected categories (sorry for 200+ files :P) as he probably knows them the best and a review from @dfandrich as he is the inventor of this idea.
Handling the categories are like traversing a directory. So it would be handy to have an interactive completion mode in
With the Python
#!/usr/bin/env python from prompt_toolkit.shortcuts import CompleteStyle, prompt from prompt_toolkit.completion import WordCompleter curl_completer = WordCompleter ([ "auth", "connection", "curl", "dns", "file", "ftp", "http", "imap", "misc", "output", "pop3", "post", "proxy", "scp", "sftp", "smtp", "ssh", "telnet", "tftp", "tls", "upload", "verbose" ], ignore_case = True) category = prompt ("Give me a curl category. Press <TAB> for all: ", completer = curl_completer, complete_while_typing = True, complete_style = CompleteStyle.MULTI_COLUMN) print ("Got category: %s" % category)
The idea was then to give another prompt based on a match to those added
I like your idea, however making it interactive is the task of the shell, not ours. However maybe we should provide autocompletion scripts. It wouldn't be a problem to add this functionality to the gen.pl script but this is probably outside of the scope of this PR.
Two questions (that I didn't find answered yet, most probably because I didn't look very closely yet):
Not yet but I think it throws a warning that it misses a category line. Same with other required options
Yes, because there won't be a bitmask #DEFINE. However if you're generate the bitmask definitions with