aboutsummaryrefslogtreecommitdiff
path: root/src/tool_help.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_help.c')
-rw-r--r--src/tool_help.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/tool_help.c b/src/tool_help.c
index 8983a4ca0..04ac24537 100644
--- a/src/tool_help.c
+++ b/src/tool_help.c
@@ -73,8 +73,6 @@ static const struct category_descriptors categories[] = {
{NULL, NULL, CURLHELP_HIDDEN}
};
-extern const struct helptxt helptext[];
-
static void print_category(curlhelp_t category)
{
@@ -175,12 +173,30 @@ void tool_version_info(void)
printf("Release-Date: %s\n", LIBCURL_TIMESTAMP);
#endif
if(built_in_protos[0]) {
+ const char *insert = NULL;
+ /* we have ipfs and ipns support if libcurl has http support */
+ for(builtin = built_in_protos; *builtin; ++builtin) {
+ if(insert) {
+ /* update insertion so ipfs will be printed in alphabetical order */
+ if(strcmp(*builtin, "ipfs") < 0)
+ insert = *builtin;
+ else
+ break;
+ }
+ else if(!strcmp(*builtin, "http")) {
+ insert = *builtin;
+ }
+ }
printf("Protocols:");
for(builtin = built_in_protos; *builtin; ++builtin) {
/* Special case: do not list rtmp?* protocols.
They may only appear together with "rtmp" */
if(!curl_strnequal(*builtin, "rtmp", 4) || !builtin[0][4])
printf(" %s", *builtin);
+ if(insert && insert == *builtin) {
+ printf(" ipfs ipns");
+ insert = NULL;
+ }
}
puts(""); /* newline */
}