Loading docs/cmdline-opts/Makefile.inc +2 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ DPAGES = abstract-unix-socket.d anyauth.d append.d basic.d cacert.d capath.d cer tlsauthtype.d tlspassword.d tlsuser.d tlsv1.0.d tlsv1.1.d tlsv1.2.d \ tlsv1.3.d tlsv1.d trace-ascii.d trace.d trace-time.d tr-encoding.d \ unix-socket.d upload-file.d url.d use-ascii.d user-agent.d user.d \ verbose.d version.d write-out.d xattr.d request-target.d verbose.d version.d write-out.d xattr.d request-target.d \ styled-output.d OTHERPAGES = page-footer page-header docs/cmdline-opts/styled-output.d 0 → 100644 +6 −0 Original line number Diff line number Diff line Long: styled-output Help: Enable styled output for HTTP headers Added: 7.61.0 --- Enables the automatic use of bold font styles when writing HTTP headers to the terminal. Use --no-styled-output to switch them off. src/tool_cb_hdr.c +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata) if(!outs->stream && !tool_create_output_file(outs, FALSE)) return failure; if(hdrcbdata->global->isatty) if(hdrcbdata->global->isatty && hdrcbdata->global->styled_output) value = memchr(ptr, ':', cb); if(value) { size_t namelen = value - ptr; Loading src/tool_cfgable.h +1 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,7 @@ struct GlobalConfig { int progressmode; /* CURL_PROGRESS_BAR / CURL_PROGRESS_STATS */ char *libcurl; /* Output libcurl code to this file name */ bool fail_early; /* exit on first transfer error */ bool styled_output; /* enable fancy output style detection */ struct OperationConfig *first; struct OperationConfig *current; struct OperationConfig *last; /* Always last in the struct */ Loading src/tool_getparam.c +5 −2 Original line number Diff line number Diff line Loading @@ -260,6 +260,7 @@ static const struct LongShort aliases[]= { {"EB", "socks5-gssapi", ARG_BOOL}, {"f", "fail", ARG_BOOL}, {"fa", "fail-early", ARG_BOOL}, {"fb", "styled-output", ARG_BOOL}, {"F", "form", ARG_STRING}, {"Fs", "form-string", ARG_STRING}, {"g", "globoff", ARG_BOOL}, Loading Loading @@ -1643,8 +1644,10 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ case 'a': /* --fail-early */ global->fail_early = toggle; break; default: /* fail hard on errors */ case 'b': /* --styled-output */ global->styled_output = toggle; break; default: /* --fail (hard on errors) */ config->failonerror = toggle; } break; Loading Loading
docs/cmdline-opts/Makefile.inc +2 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ DPAGES = abstract-unix-socket.d anyauth.d append.d basic.d cacert.d capath.d cer tlsauthtype.d tlspassword.d tlsuser.d tlsv1.0.d tlsv1.1.d tlsv1.2.d \ tlsv1.3.d tlsv1.d trace-ascii.d trace.d trace-time.d tr-encoding.d \ unix-socket.d upload-file.d url.d use-ascii.d user-agent.d user.d \ verbose.d version.d write-out.d xattr.d request-target.d verbose.d version.d write-out.d xattr.d request-target.d \ styled-output.d OTHERPAGES = page-footer page-header
docs/cmdline-opts/styled-output.d 0 → 100644 +6 −0 Original line number Diff line number Diff line Long: styled-output Help: Enable styled output for HTTP headers Added: 7.61.0 --- Enables the automatic use of bold font styles when writing HTTP headers to the terminal. Use --no-styled-output to switch them off.
src/tool_cb_hdr.c +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata) if(!outs->stream && !tool_create_output_file(outs, FALSE)) return failure; if(hdrcbdata->global->isatty) if(hdrcbdata->global->isatty && hdrcbdata->global->styled_output) value = memchr(ptr, ':', cb); if(value) { size_t namelen = value - ptr; Loading
src/tool_cfgable.h +1 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,7 @@ struct GlobalConfig { int progressmode; /* CURL_PROGRESS_BAR / CURL_PROGRESS_STATS */ char *libcurl; /* Output libcurl code to this file name */ bool fail_early; /* exit on first transfer error */ bool styled_output; /* enable fancy output style detection */ struct OperationConfig *first; struct OperationConfig *current; struct OperationConfig *last; /* Always last in the struct */ Loading
src/tool_getparam.c +5 −2 Original line number Diff line number Diff line Loading @@ -260,6 +260,7 @@ static const struct LongShort aliases[]= { {"EB", "socks5-gssapi", ARG_BOOL}, {"f", "fail", ARG_BOOL}, {"fa", "fail-early", ARG_BOOL}, {"fb", "styled-output", ARG_BOOL}, {"F", "form", ARG_STRING}, {"Fs", "form-string", ARG_STRING}, {"g", "globoff", ARG_BOOL}, Loading Loading @@ -1643,8 +1644,10 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ case 'a': /* --fail-early */ global->fail_early = toggle; break; default: /* fail hard on errors */ case 'b': /* --styled-output */ global->styled_output = toggle; break; default: /* --fail (hard on errors) */ config->failonerror = toggle; } break; Loading