2026-08-22 13:50:03 +02:00
2026-08-22 13:50:03 +02:00
2026-08-20 23:48:49 +02:00
2026-08-22 13:50:03 +02:00
2026-08-17 23:19:13 +02:00
2026-08-22 13:50:03 +02:00
2026-08-22 13:50:03 +02:00
2026-08-22 13:50:03 +02:00
2026-08-17 13:22:29 +02:00
2026-08-20 23:48:49 +02:00
2026-08-18 11:42:40 +02:00
2026-08-22 13:50:03 +02:00

rash-coreutils

Portable Unix-style commands for Rash, implemented in Racket.

Version 0.2.16 fixes the Racket 9.2 test suite and aligns package version metadata. Command behavior is unchanged. The package includes the edit command backed by rackedit, streaming head and tail, and the portable time command.

Rash remains responsible for shell syntax such as globbing, pipelines and redirection. rash-coreutils additionally accepts Racket regular expressions as path selectors.

Editing

edit opens one file using the editor configured by current-coreutils-editor. The default editor is RackEdit's rkdt procedure.

edit notes.rkt
edit --wait notes.rkt

--wait is passed to RackEdit as #:wait? #t. In ordinary Racket code a different editor can be selected dynamically by parameterizing current-coreutils-editor with a procedure that accepts a file path and the #:wait? keyword.

Command timing

time executes one rash-coreutils command or executable and writes timing data to standard error. Command output therefore remains suitable for pipelines and redirection. The portable measurements are elapsed (real) time, combined CPU time (cpu) for Racket and completed subprocesses, and Racket garbage-collection time (gc).

time head -n 100 large.txt
time raco test tests/coreutils.rkt

Racket tooling

rash-coreutils also exposes the raco command from the active Racket installation, without requiring raco to be on PATH.

raco setup rash-coreutils
raco pkg show

In Racket expression mode, use coreutils-raco, for example (coreutils-raco '(setup rash-coreutils)). The name raco is reserved for the Rash command binding.

Windows paths

Commands that print paths use forward slashes on Windows. This keeps their textual output directly reusable in Rash line mode, where a backslash is an escape character. Internally, Racket path values remain native paths.

pwd
C:/devel/racket/rash-coreutils/

mktemp
C:/Users/hans/AppData/Local/Temp/tmp123

A native Racket path value can still be passed directly, for example ls (values (find-system-path 'temp-dir)).

S
Description
Commands like 'ls', 'mkdir', etc. for rash, but platform independent, i.e. working on windows and on unix flavors.
Readme MIT 104 KiB
Languages
Racket 99.4%
Makefile 0.6%