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

man-db: set less as default pager #68401

Merged
merged 1 commit into from Sep 17, 2019
Merged

Conversation

matthewbauer
Copy link
Member

This is the default on most systems, most users want this one. The
value can still be overriden with the “PAGER” value.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

This is the default on most systems, most users want this one. The
value can still be overriden with the “PAGER” value.
@lheckemann
Copy link
Member

What does it currently use?

@matthewbauer
Copy link
Member Author

@lheckemann lheckemann added this to the 20.03 milestone Sep 12, 2019
@lheckemann
Copy link
Member

This might be problematic when less isn't available? It certainly is included in a basic installation of NixOS, but I'm not sure about funkier stuff like alpine for instance.

$ PAGER=nonexistent-pager man less
/run/current-system/sw/bin/man: can't execute nonexistent-pager: No such file or directory
/run/current-system/sw/bin/man: command exited with status 255: sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }' | (cd <fd 3> && LESS=-ix8RmPm Manual page less(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page less(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$ MAN_PN=less(1) nonexistent-pager)

Then again, I guess it's an obscure enough case that a user who doesn't have less available will be able to tell that they can install less to fix this, so I wouldn't be opposed to this change.

@matthewbauer
Copy link
Member Author

This might be problematic when less isn't available? It certainly is included in a basic installation of NixOS, but I'm not sure about funkier stuff like alpine for instance.

It should still fall back to cat if less isn't available (and PAGER isn't set).

@worldofpeace worldofpeace changed the base branch from master to staging September 17, 2019 17:23
@worldofpeace worldofpeace merged commit 5afa02d into staging Sep 17, 2019
@worldofpeace worldofpeace deleted the man-db-default-pager branch September 17, 2019 17:39
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.

None yet

3 participants