Version 0.2.0 behavior is documented here. Thesupport record separates local verification frompublished MoonX behavior; moonx examples use registry releases.
Split a file into sections at line numbers or basic regular expressions:
NUMBER splits before that absolute line; /REGEXP/ splits before a matchingline and %REGEXP% discards the preceding section. Regex delimiters may befollowed by a positive or negative line offset. {N} repeats the precedingpattern N additional times. Regex {*} repeats through the remaining input;numeric repetitions that reach beyond the last line report an error.The first operand - reads stdin. All input bytes, including NUL and anunterminated final line, are preserved in selected fragments.
Files are named xx00, xx01, … . -f/--prefix changes the prefix and-n/--digits sets the minimum number of suffix digits. Byte counts are printedfor created files unless -s/--silent or -q/--quiet is selected.-z/--elide-empty-files omits empty fragments. Split failures remove the filescreated by that invocation unless -k/--keep-files is used.
-b/--suffix-format replaces the default digits with exactly one d/i/u/o/x/Xinteger conversion, literal text and %%. Width, precision, left/zero paddingand applicable alternate/thousands flags follow the GNU C profile. Repeatedformats use the last; -b determines layout independently of -n ordering.Invalid formats fail before file creation.Windows ordinary filesystem paths trim trailing spaces and dots. A generatedname with either ending is therefore refused with status 2 before readinginput; it never silently creates a differently named fragment. Verbatim-namesupport requires verified Native/Wasm creation, reading and observation ofthose exact names.
--suppress-matched omits the line at the offset-adjusted split boundary forregex, ignored regex and numeric patterns. Empty elision reuses the nextoutput suffix; suppression preserves the separate regex-search cursor.
Input is buffered. The shared C-byte BRE matcher compiles each expression onceand supports capture backreferences, byte classes and word assertions.Repeated nullable captures follow the tested GNU candidate and capture-registerselection, including counted repeats and references. See theworkspace support record.Existing output paths are refused. Locale-sensitive matching is outside theselected profile. --help and --version provide commandinformation.
Standalone --version prints exactly csplit 0.2.0 followed by onenewline. Standalone --help starts with Usage: csplit, lists bothmetadata options, and ends with a newline. Both write to stdout, leave stdinunread, and exit with status 0. Exact-version publication and verificationremain recorded separately in the support record.