[Midnightbsd-cvs] [MidnightBSD/src] da2b7b: time: add -f format option compatible with GNU tim...

Lucas Holt noreply at github.com
Tue Sep 8 17:35:39 EDT 2026


  Branch: refs/heads/stable/4.1
  Home:   https://github.com/MidnightBSD/src
  Commit: da2b7bbfcde96deff32739fd64e3a4cf9af45eaa
      https://github.com/MidnightBSD/src/commit/da2b7bbfcde96deff32739fd64e3a4cf9af45eaa
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M etc/mtree/BSD.tests.dist
    M usr.bin/time/Makefile
    A usr.bin/time/tests/Makefile
    A usr.bin/time/tests/time_test.sh
    M usr.bin/time/time.1
    M usr.bin/time/time.c

  Log Message:
  -----------
  time: add -f format option compatible with GNU time (#505)

Add a -f option to time(1) that prints resource usage according to a
user supplied format string.  The conversion characters follow GNU
time (%e, %E, %U, %S, %P, %M, %x, %C and friends) so that scripts
written against it on Linux work unchanged.  The averaged memory
conversions reuse the tick arithmetic already used by -l.

-f takes precedence over -h and -p; -l output still follows the
formatted line.  Document the option and every conversion in time.1,
and add a Kyua test suite covering the escapes, exit status and
signal reporting, flag precedence and -o/-a handling.

AI-Assisted-by: Claude Fable 5.1

Claude-Session: https://claude.ai/code/session_01H3gnjjAZarNMCJKqJz7s2m

Signed-off-by: Lucas Holt <luke at foolishgames.com>
Co-authored-by: Claude Fable 5.1 <noreply at anthropic.com>
(cherry picked from commit 4c9654bcb04937bb85485607504197c127ad914a)



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications


More information about the Midnightbsd-cvs mailing list