Skip to content

uptime: Add -p, --pretty argument - #10143

Merged
sylvestre merged 2 commits into
uutils:mainfrom
Ivan-Shaml:uptime-pretty-print
Jan 11, 2026
Merged

uptime: Add -p, --pretty argument#10143
sylvestre merged 2 commits into
uutils:mainfrom
Ivan-Shaml:uptime-pretty-print

Conversation

@Ivan-Shaml

Copy link
Copy Markdown
Contributor

Rebase of PR #7910
All credits go to GitHub User: @irbeam256

This PR is: proper rebase the mentioned PR, and leaving only the changes in scope

Closes #7903

Comment thread src/uu/uptime/src/uptime.rs Outdated
fn print_uptime(boot_time: Option<time_t>) -> UResult<()> {
print!("up {}, ", get_formatted_uptime(boot_time)?);
print!(
"up {}, ",

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.

i think this needs to be localized (translate!)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread src/uu/uptime/src/uptime.rs Outdated

fn pretty_print_uptime() -> UResult<()> {
println!(
"up {}",

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.

same

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/stty/bad-speed is now passing!

@Ivan-Shaml
Ivan-Shaml requested a review from sylvestre January 10, 2026 23:08
@sylvestre
sylvestre merged commit 91edf28 into uutils:main Jan 11, 2026
133 checks passed
@Ivan-Shaml
Ivan-Shaml deleted the uptime-pretty-print branch January 11, 2026 11:56
@sylvestre

Copy link
Copy Markdown
Contributor

thanks

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.

uptime: Add -p, --pretty show uptime in pretty format option

2 participants