eep(1) #103

Open
trinity wants to merge 14 commits from sleep into main
Owner

This implements #83.

This implements #83.
trinity added the
enhancement
label 2024-05-04 03:17:54 +00:00
trinity added 2 commits 2024-05-04 03:17:54 +00:00
trinity requested review from emma 2024-05-04 03:18:18 +00:00
trinity added 6 commits 2024-05-04 03:32:25 +00:00
Owner

Can we call it eep(1)?

Can we call it `eep(1)`?
Author
Owner

Sure but you have to rename it on the branch.

Sure but you have to rename it on the branch.
emma added 1 commit 2024-05-30 01:38:33 +00:00
emma changed title from sleep(1) to eep(1) 2024-05-30 01:39:09 +00:00
emma added 2 commits 2024-06-09 05:50:50 +00:00
emma added 1 commit 2024-06-09 05:52:48 +00:00
emma requested changes 2024-06-09 05:54:03 +00:00
docs/eep.1 Outdated
@ -0,0 +17,4 @@
.SH DESCRIPTION
Eep waits the given amount of seconds before exiting.
Owner

Eep waits a given number of seconds

> `Eep waits a given number of seconds`
emma marked this conversation as resolved
docs/eep.1 Outdated
@ -0,0 +41,4 @@
seconds, five times, using rpn(1) and xargs(1p).
.RS
.R $ rpn 60 5 '*' | xargs eep
Owner

.R is invalid man roff.

`.R` is invalid man roff.
emma marked this conversation as resolved
docs/eep.1 Outdated
@ -0,0 +46,4 @@
.SH COPYRIGHT
Copyright (c) 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later
Owner

Copyright \(co 2024 DTB.

> `Copyright \(co 2024 DTB.`
emma marked this conversation as resolved
docs/eep.1 Outdated
@ -0,0 +51,4 @@
.SH SEE ALSO
sleep(3)
Owner

Should you reference sleep(1p) as well?

Should you reference `sleep(1p)` as well?
emma marked this conversation as resolved
docs/sleep.1 Outdated
@ -0,0 +16,4 @@
.SH DESCRIPTION
Sleep waits the given amount of seconds before exiting.
Owner

Wait a number of seconds before exiting.

Wait a number of seconds before exiting.
emma marked this conversation as resolved
docs/sleep.1 Outdated
@ -0,0 +21,4 @@
.SH DIAGNOSTICS
Sleep exits successfully when the time specified has elapsed, or unsuccessfully
if the time fails to elapse or if invoked incorrectly. In the latter scenario
Owner

If the specified time fails to elapse or in the case of incorrect invocation, the program will
exit unsuccessfully. In the latter scenario, a debug message will be printed.

For parity with other man pages.

> If the specified time fails to elapse or in the case of incorrect invocation, the program will exit unsuccessfully. In the latter scenario, a debug message will be printed. [For parity with other man pages](https://git.tebibyte.media/bonsai/coreutils/pulls/93#issuecomment-4547).
emma marked this conversation as resolved
docs/sleep.1 Outdated
@ -0,0 +26,4 @@
.SH BUGS
User may still be tired after invoking sleep.
Owner

The user my still be tired after invocation.

> The user my still be tired after invocation.
emma marked this conversation as resolved
docs/sleep.1 Outdated
@ -0,0 +30,4 @@
.SH EXAMPLES
The following invocation sleeps for five seconds.
Owner

[...] for five seconds:

> [...] for five seconds:
emma marked this conversation as resolved
src/eep.rs Outdated
@ -0,0 +27,4 @@
use sysexits::EX_USAGE;
fn usage(s: &str) -> ExitCode {
eprintln!("Usage: {} [seconds]", s);
Owner

"Usage: {} seconds"

> `"Usage: {} seconds"`
Owner

A patch containing my recommended changes:

diff --git a/docs/eep.1 b/docs/eep.1
index 150c5b6..1032535 100644
--- a/docs/eep.1
+++ b/docs/eep.1
@@ -3,52 +3,41 @@
 .\"
 .\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
 .\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
-
+.\"
 .TH EEP 1
-
 .SH NAME
-
 eep \(en wait a moment
-
+.\"
 .SH SYNOPSIS
 
 eep
 .RB [ seconds ]
-
+.\"
 .SH DESCRIPTION
 
-Eep waits the given amount of seconds before exiting.
-
+Wait a specified number of seconds before exiting.
+.\"
 .SH DIAGNOSTICS
 
-Eep exits successfully when the time specified has elapsed, or unsuccessfully
-if the time fails to elapse or if invoked incorrectly. In the latter scenario
-eep will also print a usage synopsis.
-
-.SH BUGS
-
-User may still be tired after invoking eep.
-
-.SH EXAMPLES
-
-The following invocation eeps for five seconds.
-
-.RS
-.R eep 5
-.RE
-
-The following sh(1p) command line eeps for five minutes, or for sixty
-seconds, five times, using rpn(1) and xargs(1p).
+If the specified time fails to elapse or in the case of incorrect invocation,
+the program will exit unsuccessfully. In the latter scenario, a debug message
+will be printed.
+.\"
+.SH CAVEATS
 
-.RS
-.R $ rpn 60 5 '*' | xargs eep
-.RE
+User may still be tired after invocation.
+.\"
+.SH AUTHOR
 
+Written by DTB
+.MT trinity@trinity.moe
+.ME .
+.\"
 .SH COPYRIGHT
 
-Copyright (c) 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later
+Copyright \(co 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later
 <https://gnu.org/licenses/gpl.html>.
-
+.\"
 .SH SEE ALSO
-
-sleep(3)
+.BR sleep (3p)
+.BR sleep (1p)
A patch containing my recommended changes: ``` diff --git a/docs/eep.1 b/docs/eep.1 index 150c5b6..1032535 100644 --- a/docs/eep.1 +++ b/docs/eep.1 @@ -3,52 +3,41 @@ .\" .\" This work is licensed under CC BY-SA 4.0. To see a copy of this license, .\" visit <http://creativecommons.org/licenses/by-sa/4.0/>. - +.\" .TH EEP 1 - .SH NAME - eep \(en wait a moment - +.\" .SH SYNOPSIS eep .RB [ seconds ] - +.\" .SH DESCRIPTION -Eep waits the given amount of seconds before exiting. - +Wait a specified number of seconds before exiting. +.\" .SH DIAGNOSTICS -Eep exits successfully when the time specified has elapsed, or unsuccessfully -if the time fails to elapse or if invoked incorrectly. In the latter scenario -eep will also print a usage synopsis. - -.SH BUGS - -User may still be tired after invoking eep. - -.SH EXAMPLES - -The following invocation eeps for five seconds. - -.RS -.R eep 5 -.RE - -The following sh(1p) command line eeps for five minutes, or for sixty -seconds, five times, using rpn(1) and xargs(1p). +If the specified time fails to elapse or in the case of incorrect invocation, +the program will exit unsuccessfully. In the latter scenario, a debug message +will be printed. +.\" +.SH CAVEATS -.RS -.R $ rpn 60 5 '*' | xargs eep -.RE +User may still be tired after invocation. +.\" +.SH AUTHOR +Written by DTB +.MT trinity@trinity.moe +.ME . +.\" .SH COPYRIGHT -Copyright (c) 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later +Copyright \(co 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later <https://gnu.org/licenses/gpl.html>. - +.\" .SH SEE ALSO - -sleep(3) +.BR sleep (3p) +.BR sleep (1p) ```
trinity added 1 commit 2024-06-26 15:16:15 +00:00
trinity added 1 commit 2024-06-26 21:38:00 +00:00
emma reviewed 2024-06-26 22:01:18 +00:00
@ -121,0 +122,4 @@
eep: build/bin/eep
build/bin/eep: src/eep.rs build rustlibs
$(RUSTC) $(RUSTFLAGS) \
--extern sysexits=build/o/libsysexits.rlib \
Owner

This is unnecessary due to the merge-in of the main branch: $(RUSTLIBS) was introduced.

This is unnecessary due to the merge-in of the main branch: `$(RUSTLIBS)` was introduced.
emma added a new dependency 2024-06-30 04:02:10 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin sleep:sleep
git checkout sleep

Merge

Merge the changes and update on Gitea.
git checkout main
git merge --no-ff sleep
git checkout main
git merge --ff-only sleep
git checkout sleep
git rebase main
git checkout main
git merge --no-ff sleep
git checkout main
git merge --squash sleep
git checkout main
git merge --ff-only sleep
git checkout main
git merge sleep
git push origin main
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Depends on
#96 WIP: testing
bonsai/harakit
Reference: bonsai/harakit#103
No description provided.