Skip to content

Conversation

@bmrips
Copy link
Contributor

@bmrips bmrips commented Nov 23, 2025

Description

This PR fixes two things in the programs.less module:

  • Enable an option to be specified multiple times by assigning a list of values to the option. While the machinery works, this is currently limited by the type of the option.
  • The --color/-D and --prompt/-P options need to occur in a certain order (see the comments in the code and the less(1) man page for more information)

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.
    • Generate a news entry. See News
    • Basic tests added. See Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See News

@teto
Copy link
Collaborator

teto commented Nov 24, 2025

if order matters, maybe "options" should be made into a list instead of an attrset. I applaud what you've done but I fear this makes more complex. Let's see what @Pamplemousse thinks

@khaneliman
Copy link
Collaborator

if order matters, maybe "options" should be made into a list instead of an attrset. I applaud what you've done but I fear this makes more complex. Let's see what @Pamplemousse thinks

List or using lib.hm.types.dagOf with the attrs should work instead of manually separating and managing attrsets like that.

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