Skip to content

Rework pkg-set.8 #2076

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pauamma
Copy link
Contributor

@pauamma pauamma commented Oct 5, 2022

  • Reorganize synopsis to pair short and long options

  • Mark exclusive options as such

  • Add missing --vital synonym for -v

  • Reorder sections to pacify mandoc -T lint

  • Copyedit and fix markup throughout

- Reorganize synopsis to pair short and long options

- Mark exclusive options as such

- Add missing --vital synonym for -v

- Reorder sections to pacify mandoc -T lint

- Copyedit and fix markup throughout
@pauamma
Copy link
Contributor Author

pauamma commented Oct 5, 2022

Planning to go over all manual pages. Will mark as mergeable when done.

@0mp
Copy link
Member

0mp commented Oct 6, 2022

Hey Pau Amma, thanks for working on the manual pages.

I’d like to suggest dropping the long options from the synopsis entirely for readability. See #2027. This way it would also be less editing work for you.

@vstakhov
Copy link
Member

vstakhov commented Oct 6, 2022

I'm not even sure if there is any useful outcome of just listing all possible options and arguments (especially optional ones) in the same place. Short options only are totally useless as they provide no information about what they do. Long options are, indeed, messy... So a format like pkg set <mandatory_arguments_and_options> [OPTIONS] look more sane: we define the mandatory long/short options/arguments and hide everything else in that [OPTIONS] block, describing all those options later.

Copy link
Contributor

@concussious concussious left a comment

Choose a reason for hiding this comment

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

Hey Pau! Few suggestions so far:

GitHub won't let me comment on line 92, but it should read:

Usually this will be explained in
.Pa ports/UPDATING .

.Dt PKG-SET 8
.Os
.Sh NAME
.Nm "pkg set"
.Nd modify information in the installed database
.Nd modify information in the installed packages database
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.Nd modify information in the installed packages database
.Nd modify information in the installed package database

@@ -14,32 +14,23 @@
.\"
.\" @(#)pkg.8
.\"
.Dd November 18, 2016
.Dd October 5, 2022
.Dt PKG-SET 8
.Os
.Sh NAME
.Nm "pkg set"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.Nm "pkg set"
.Nm pkg-set

This affects the operation of
.Xr pkg-autoremove 8 .
.It Fl a , Cm --all
.It Fl a , Fl -all
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Match
.Ar pkg-name
as a regular expression according to the "modern" or "extended" syntax of
as a regular expression using the modern or extended syntax of
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
as a regular expression using the modern or extended syntax of
using an extended regular expression as documented in

Extended regular expression is the standardized definition of this. "Modern" is vague and doesn't age well, and this syntax has existed longer than I've been alive.

See
.Xr pkg.conf 5
for further description.
.Bl -tag -width ".Ev CASE_SENSITIVE_MATCH"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.Bl -tag -width ".Ev CASE_SENSITIVE_MATCH"
.Bl -tag -width "CASE_SENSITIVE_MATCH"

Using macros in list widths is an undefined behavior, which notably renders as -1 space in some implementations.

I really love moving sections into standard order! I think it makes it more predictable!

.Sh FILES
See
.Xr pkg.conf 5 .
.Sh EXAMPLES
Change a package from automatic to non-automatic, which will prevent
Change a package from automatic to non-automatic, which will keep
Copy link
Contributor

Choose a reason for hiding this comment

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

No, prevent was better grammar.

.Xr re_format 7 .
.It Fl v Ar 01
.It Fl v Ar 0|1 , Fl -vital Ar 0|1
Copy link
Contributor

Choose a reason for hiding this comment

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

In style.mdoc, we do say that that the preferred syntax for "x | y" is without a space, however the vast majority of the time we do use a space, and so does the rest of the industry. The other day I even found this syntax with a space describing sauces available with chicken wings.

matching against
.Ar pkg-name
case insensitive.
case-insensitive.
This is the default, unless modified by setting
.Ev CASE_SENSITIVE_MATCH
to true in
.Pa pkg.conf .
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.Pa pkg.conf .
.Xr pkg.conf 5 .

I think xrefs take highest priority when there are multiple appropriate macros since they're clickable in most implementations.

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.

4 participants