Skip to content

Styling project command line options - #12146

Open
philderbeast wants to merge 22 commits into
haskell:masterfrom
cabalism:doc/project-option-command-line-variants
Open

Styling project command line options#12146
philderbeast wants to merge 22 commits into
haskell:masterfrom
cabalism:doc/project-option-command-line-variants

Conversation

@philderbeast

@philderbeast philderbeast commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Related to #12144, renders the project command line options with a command line style. The -- preceded options are parsed out or you can optionally use a :command-line-options: directive.

  • Before
image
  • After
image

Note

If this is acceptable and enough to show command line options (the $ prefix indicating this), then we might remove some of the text describing the same thing. In other words, instead of fixing #12144 by using the plural, we could remove a lot of that text where it adds no value.

Warning

I used Copilot to write the *.py and *.css changes.

I used sphinx warnings reporting missing references to identify undocumented command line options. I've added these as a new "Undocumented options" section, a fraction of which is shown here:

image

Having an undocumented section like this gets rid of those missing reference warnings. Also note the enable-*, disable-* items on the same line. This works for linking to references.


  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@ffaf1

ffaf1 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

I like the change, but 80 new lines of Python, I don't fancy those.

@philderbeast
philderbeast force-pushed the doc/project-option-command-line-variants branch 2 times, most recently from 5a478c3 to 344b863 Compare July 22, 2026 21:30
@Bodigrim

Copy link
Copy Markdown
Collaborator

Dunno, I'm rather sceptical about having more Python and more custom CSS, both of which has to be supported in eternity (e. g., if ReadTheDocs makes breaking changes).

@philderbeast
philderbeast force-pushed the doc/project-option-command-line-variants branch from 46922ed to bb59581 Compare July 26, 2026 23:55
@philderbeast

Copy link
Copy Markdown
Collaborator Author

I like the change, but 80 new lines of Python, I don't fancy those.

Thanks @ffaf1. The line count change is looking better.

image

@ulysses4ever

ulysses4ever commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

I am fine with extra python and css.

I find sequence like $ --allow-newer confusing and I'd appreciate it if a way around it was found in this PR. In particular I don't see the dollar sign as something that introduced command line options necessarily; plus, an option without an executable name just looks weird, so the whole thing doesn't look remotely close to what you are used to in command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants