Skip to content

uudoc: prefer Linux tldr pages over common pages - #15426

Open
limadog9 wants to merge 1 commit into
uutils:mainfrom
limadog9:fix/uudoc-prefer-linux-tldr
Open

limadog9 wants to merge 1 commit into
uutils:mainfrom
limadog9:fix/uudoc-prefer-linux-tldr

Conversation

@limadog9

Copy link
Copy Markdown
Contributor

Prefer Linux tldr pages for GNU-specific examples, falling back to common pages when no Linux page exists. Add regression coverage for both Markdown and manpage output.

Closes #7609.

@oech3

oech3 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

I don't like this since people can just scrool. But let's see maintainer's thought.

Comment thread src/bin/uudoc.rs Outdated
) -> io::Result<String> {
let content = if let Some(f) = get_zip_content(archive, &format!("pages/common/{name}.md")) {
// Prefer GNU-specific examples over generic POSIX examples.
let content = if let Some(f) = get_zip_content(archive, &format!("pages/linux/{name}.md")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

did you check the utils where the linux page is for another implementation (procps uptime, net-tools hostname, util-linux more)?
they could now show examples for options we don't support

Comment thread src/bin/uudoc.rs Outdated
let mut archive = ZipArchive::new(zip.finish().unwrap()).unwrap();
let output = write_zip_examples(&mut archive, "head", markdown).unwrap();
assert!(output.contains(&format!("{expected} example:")), "{output}");
if platforms.len() > 1 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why only when there are 2 platforms? asserting the other platform is absent would work for every case

@limadog9
limadog9 force-pushed the fix/uudoc-prefer-linux-tldr branch from 0b1e58c to 903ef3a Compare October 19, 2026 20:30

This branch has not been deployed

No deployments
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.

Documentation: Prefer linux platform over common for tldr pages

3 participants