[Midnightbsd-cvs] [MidnightBSD/src] caa528: Import shuf utility from OpenBSD

Lucas Holt noreply at github.com
Thu Jul 9 19:37:33 EDT 2026


  Branch: refs/heads/feature/import-shuf
  Home:   https://github.com/MidnightBSD/src
  Commit: caa528950ba03717d352b82d04a6cbdd7bcfd185
      https://github.com/MidnightBSD/src/commit/caa528950ba03717d352b82d04a6cbdd7bcfd185
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    R aitools.md
    M usr.bin/shuf/shuf.c

  Log Message:
  -----------
  Import shuf utility from OpenBSD

Import the shuf (random permutation) utility from Brian Callahan's
OpenBSD implementation (https://github.com/ibara/shuf).

Features:
- Shuffle lines from stdin or a file
- -e flag: shuffle command-line arguments
- -i flag: shuffle a range of integers (lo-hi)
- -n flag: limit output to N lines
- -r flag: sample with replacement (repeat output)
- -z flag: null-delimited output
- -o flag: write output to file

MidnightBSD-specific changes:
- Use __dead2 instead of __dead for noreturn functions
- Added forward declarations for all static functions
- Removed OpenBSD-specific pledge() calls
- Added Capsicum support using caph_enter() from capsicum_helpers.h
- All functions (arc4random_uniform, reallocarray, strtonum, getprogname)
  are already present in MidnightBSD libc

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe at mistral.ai>



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