[Midnightbsd-cvs] [MidnightBSD/src] 9c0a10: Import shuf utility from OpenBSD
Lucas Holt
noreply at github.com
Thu Jul 9 18:50:19 EDT 2026
Branch: refs/heads/feature/import-shuf
Home: https://github.com/MidnightBSD/src
Commit: 9c0a105ae1bc9e26af3b26ad81ac72e98ba51193
https://github.com/MidnightBSD/src/commit/9c0a105ae1bc9e26af3b26ad81ac72e98ba51193
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-07-09 (Thu, 09 Jul 2026)
Changed paths:
A aitools.md
A usr.bin/shuf/Makefile
A usr.bin/shuf/shuf.1
A 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 to output file
MidnightBSD-specific changes:
- Use __dead2 instead of __dead for noreturn functions
- Added forward declarations for all 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
Also added aitools.md documenting GNU coreutils compatibility for AI agents.
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