Skip to content

Format "wcurl --help" output for 80 columns with correct indentation#87

Open
cpina wants to merge 1 commit intocurl:mainfrom
cpina:format-help-80-columns
Open

Format "wcurl --help" output for 80 columns with correct indentation#87
cpina wants to merge 1 commit intocurl:mainfrom
cpina:format-help-80-columns

Conversation

@cpina
Copy link

@cpina cpina commented Feb 15, 2026

No description provided.

@cpina
Copy link
Author

cpina commented Feb 15, 2026

Now:

image

Before:

image

I've spotted some small differences between --help and the manual. I will address them separately.

Text changes are:

  • removed full stops at the end of the lines
  • removed wcurl -- a simple wrapper around curl to easily download files. because I didn't see other common software writing what seemed to me a manual header in the --help output.

I am happy to iterate on that (for formatting changes, or the text changes that I did).

As a personal comment also: my terminal has 94 columns by default (no particular reason). I chose 80 here as an old standard but happy to choose 88 like black (or 90) instead of the current 130. I checked curl and the --help output is nice on the 80 columns even though uses a smarter system for that changing the space between the option and the description. The descriptions in curl are shorter though.

@cpina cpina force-pushed the format-help-80-columns branch from 7a36a40 to 4dd1170 Compare February 15, 2026 06:57
@cpina
Copy link
Author

cpina commented Feb 18, 2026

I'll fix the remaining test ASAP (maybe Friday or Saturday morning).

@cpina cpina force-pushed the format-help-80-columns branch from 33a3af9 to 667c963 Compare February 20, 2026 07:23
{
cat << _EOF_
${PROGRAM_NAME} -- a simple wrapper around curl to easily download files.
Usage: wcurl [options...] <URL>
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the idea behind this change?

I prefer the current format where it lists a few different ways of invoking wcurl while exposing which options can be used.

I know curl uses this format, but that makes more sense given the amount of option it has.

Copy link
Author

Choose a reason for hiding this comment

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

My reasoning when I did it:

  • it was naturally longer than 80 columns so I wanted to keep it shorter / remove it
  • at that time, I thought that the text would belong to man wcurl (SYNPOSIS section) instead of curl --help output (comparing with curl --help, ls --help, etc. it seemed a bit surprising to have it there)
  • I thought that it was a repetition of the detailed options that were below

But, I see that adds some overview on how to use it.

What do you think if I try to re-introduce it with multiple line formatting, so the user would see something like:

       ${PROGRAM_NAME} [--curl-options <CURL_OPTIONS>]... [--no-decode-filename] \
               [-o|-O|--output <PATH>] [--dry-run] [--] <URL>...
       ${PROGRAM_NAME} [--curl-options=<CURL_OPTIONS>]... [--no-decode-filename] \
               [--output=<PATH>] [--dry-run] [--] <URL>...
       ${PROGRAM_NAME} -h|--help
       ${PROGRAM_NAME} -V|--version

Would it be confusing?

(I would also add -o|-O before the second --output=<PATH> as well, unless there is some reason that is not there)

Thank you!

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