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

Implement time #53

Open
1 of 4 tasks
GrayJack opened this issue Sep 27, 2019 · 2 comments · Fixed by #141
Open
1 of 4 tasks

Implement time #53

GrayJack opened this issue Sep 27, 2019 · 2 comments · Fixed by #141
Labels
A-tool Area: Binary tool C-tracking-issue Category: A tracking issue for an feature. Hacktoberfest Hacktoberfest

Comments

@GrayJack
Copy link
Owner

GrayJack commented Sep 27, 2019

This is a tracking issue for the time utility.

Required options and flags in the POSIX standard:

  • p (long: posix, alias: portability)

Required extension options and flags:

  • l (long: rusage)
  • o (long: output)
  • a (long: append, requires: o)

Notes:
¹ : Long name not defined on other implementation of this utility. Implementer must choose a long name.
² : Short name (one letter) not defined on other implementation of this utility. Implementer must choose. a short name

References

POSIX standard text
FreeBSD Manual
NetBSD Manual
OpenBSD Manual
DragonFlyBSD Manual

Unresolved questions:

Each time implementation has some unique extensions. One may need one of those in their respective system.

History

p flag/option implemented in #141

@GrayJack GrayJack added the Hacktoberfest Hacktoberfest label Oct 3, 2020
@GrayJack GrayJack added C-tracking-issue Category: A tracking issue for an feature. A-tool Area: Binary tool labels Dec 28, 2020
@envp envp mentioned this issue Feb 21, 2021
@envp
Copy link
Contributor

envp commented Mar 7, 2021

Posting TODO here from #141:

Compatibility so far for time.1:

@bors bors bot closed this as completed in a6dc22f Mar 10, 2021
@GrayJack GrayJack reopened this Mar 10, 2021
@envp
Copy link
Contributor

envp commented Sep 24, 2021

#144 adds features from BSD time commands. -l is still unimplemented, as that requires some more work on macos (discussed on the PR)

bors bot added a commit that referenced this issue Sep 29, 2021
144: Time: Implement BSD extensions to time r=GrayJack a=envp

Provides:
- [X] `-f`: Format stats with an arbitrary printf-like `%<spec>` formatters 
- [X] `-t`: Format stats using the `tcsh(1)` format string
  - See: https://man.netbsd.org/time.1
- [X] `-c`: Write `time` stats in the `csh(1)` format string
  - See: https://man.netbsd.org/time.1
- [ ] `-l`: Dump the contents of the `rusage` struct (⚠️ Unimplemented as of this PR)
- [X] `-a`: If `-o` was provided, append to the target file instead of truncating
- [X] `-o`: Create, truncate a file to write `time` output to.

Part of: #53 

Co-authored-by: Vaibhav Yenamandra <3663231+envp@users.noreply.github.com>
bors bot added a commit that referenced this issue Sep 29, 2021
144: Time: Implement BSD extensions to time r=GrayJack a=envp

Provides:
- [X] `-f`: Format stats with an arbitrary printf-like `%<spec>` formatters 
- [X] `-t`: Format stats using the `tcsh(1)` format string
  - See: https://man.netbsd.org/time.1
- [X] `-c`: Write `time` stats in the `csh(1)` format string
  - See: https://man.netbsd.org/time.1
- [ ] `-l`: Dump the contents of the `rusage` struct (⚠️ Unimplemented as of this PR)
- [X] `-a`: If `-o` was provided, append to the target file instead of truncating
- [X] `-o`: Create, truncate a file to write `time` output to.

Part of: #53 

Co-authored-by: Vaibhav Yenamandra <3663231+envp@users.noreply.github.com>
bors bot added a commit that referenced this issue Sep 30, 2021
144: Time: Implement BSD extensions to time r=GrayJack a=envp

Provides:
- [X] `-f`: Format stats with an arbitrary printf-like `%<spec>` formatters 
- [X] `-t`: Format stats using the `tcsh(1)` format string
  - See: https://man.netbsd.org/time.1
- [X] `-c`: Write `time` stats in the `csh(1)` format string
  - See: https://man.netbsd.org/time.1
- [ ] `-l`: Dump the contents of the `rusage` struct (⚠️ Unimplemented as of this PR)
- [X] `-a`: If `-o` was provided, append to the target file instead of truncating
- [X] `-o`: Create, truncate a file to write `time` output to.

Part of: #53 

Co-authored-by: Vaibhav Yenamandra <3663231+envp@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tool Area: Binary tool C-tracking-issue Category: A tracking issue for an feature. Hacktoberfest Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants