Skip to content

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

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

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

Conversation

@Ivan-Shaml
Copy link
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

fn print_uptime(boot_time: Option<time_t>) -> UResult<()> {
print!("up {}, ", get_formatted_uptime(boot_time)?);
print!(
"up {}, ",
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

done


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

Choose a reason for hiding this comment

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

same

Copy link
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

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
Contributor

thanks

mattsu2020 pushed a commit to mattsu2020/coreutils that referenced this pull request Jan 23, 2026
* uptime: Add -p, --pretty argument

Rebase of PR uutils#7910
All credits go to GitHub User: https://github.com/irbeam256

* Add localization for "up"
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