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

Massage --help text to use max 72 characters width #2799

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

wader
Copy link
Member

@wader wader commented Jul 31, 2023

No description provided.

@wader wader force-pushed the help-max-80-chars branch from 4af06b2 to 29cbccf Compare July 31, 2023 15:21
@emanuele6
Copy link
Member

Can you limit it to 72 characters instead? That is my personal preference for line character limit; and that is the character limit the top part of the output of jq --help is using.

@wader wader force-pushed the help-max-80-chars branch from 29cbccf to e72257e Compare July 31, 2023 15:44
@wader
Copy link
Member Author

wader commented Jul 31, 2023

@emanuele6 adjusted to 72, looks like this now:

Command options:
  -n, --null-input          use `null` as the single input value;
  -R, --raw-input           read each line as string instead of JSON;
  -s, --slurp               read all inputs into an array and use it as
                            the single input value;
  -c, --compact-output      compact instead of pretty-printed output;
  -r, --raw-output          output strings without escapes and quotes;
      --raw-output0         implies -r and output NUL after each output;
  -j, --join-output         implies -r and output without newline after
                            each output;
  -a, --ascii-output        output strings by only ASCII characters
                            using escape sequences;
  -S, --sort-keys           sort keys of each object on output;
  -C, --color-output        colorize JSON output;
  -M, --monochrome-output   disable colored output;
      --tab                 use tabs for indentation;
      --indent n            use n spaces for indentation (max 7 spaces);
      --unbuffered          flush output stream after each output;
      --stream              parse the input value in streaming fashion;
      --stream-errors       implies --stream and report parse error as
                            an array;
      --seq                 parse input/output as application/json-seq;
  -f, --from-file file      load filter from the file;
  -L directory              search modules from the directory;
      --arg name value      set $name to the string value;
      --argjson name value  set $name to the JSON value;
      --slurpfile name file set $name to an array of JSON values read
                            from the file;
      --rawfile name file   set $name to string contents of file;
      --args                consume remaining arguments as positional
                            string values;
      --jsonargs            consume remaining arguments as positional
                            JSON values;
  -e, --exit-status         set exit status code based on the output;
  -V, --version             show the version;
  -h, --help                show the help;
  --                        terminates argument processing;

" -e, --exit-status set exit status code based on the output;\n"
#ifdef WIN32
" -b, --binary open input/output streams in binary mode;\n"
#endif
Copy link
Member Author

Choose a reason for hiding this comment

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

I guess we can remove "on Windows" if we do it conditionally?

Copy link
Member

@emanuele6 emanuele6 left a comment

Choose a reason for hiding this comment

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

$ ./jq --help >/dev/null 2>&1 | jq -nR 'all(inputs; . <= 72)'
true

@emanuele6
Copy link
Member

The commit message still says 80 instead of 72, but that can be fixed on GitHub selecting the `Squash and merge" merge option, so if you don't need to change the code further, just leave it as is so the CI doesn't need to re-run.

@wader wader force-pushed the help-max-80-chars branch from e72257e to b96d9ae Compare July 31, 2023 15:53
@wader wader changed the title Massage --help text to use max 80 characters width Massage --help text to use max 72 characters width Jul 31, 2023
@wader
Copy link
Member Author

wader commented Jul 31, 2023

The commit message still says 80 instead of 72, but that can be fixed on GitHub selecting the `Squash and merge" merge option, so if you don't need to change the code further, just leave it as is so the CI doesn't need to re-run.

Updated the commit message and github issue title, but the branch name will say 80

@emanuele6
Copy link
Member

The name of the branch doesn't matter ^^
But GitHub gives you the opportunity to fix typos in commit messages before merging/rebasing selecting the "Squash and merge" option, I could have used that before merging to change 80 to 72; now that you have re-committed the CI needs to re-run, but no big deal. =)

@wader
Copy link
Member Author

wader commented Jul 31, 2023

The name of the branch doesn't matter ^^ But GitHub gives you the opportunity to fix typos in commit messages before merging/rebasing selecting the "Squash and merge" option, I could have used that before merging to change 80 to 72; now that you have re-committed the CI needs to re-run, but no big deal. =)

Ah yes we don't use merge commits so branch name will not appear. Sorry for retrigger.

@emanuele6 emanuele6 merged commit f61f842 into jqlang:master Jul 31, 2023
@wader wader deleted the help-max-80-chars branch July 31, 2023 16:06
@nicowilliams
Copy link
Contributor

Thanks!

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.

3 participants