miller/docs/src
John Kerl e415682e61
Allow more step -a options to specify the number of records back (#1002) (#2190)
* Allow step -a shift_lag/shift_lead/delta/ratio to specify records back/forward (#1002)

Extends the slwin_m_n naming convention to more steppers: shift_lag_12
refers 12 records back, shift_lead_4 refers 4 records forward, and
likewise delta_N, ratio_N, and shift_N. The unsuffixed forms keep their
existing 1-record-back/forward behavior and output field names.

Backward-looking steppers cache copies of previous values in a
fixed-size ring buffer (tValueRing) in their own state, following the
existing pattern of not reading from the window keeper's already-emitted
records, to avoid races with downstream transformers. shift_lead_N uses
the existing forward-window machinery shared with slwin.

Also adds nil guards to all steppers' process functions for the case
where the record at the window center lacks the stepped field, which
previously panicked (pre-existing on main, e.g.
"mlr step -a delta,shift_lead -f x" or "-a slwin_1_1" over
heterogeneous data), and which the new parameterized combinations make
easier to reach.

Includes unit tests, regression cases 0024-0027, and regenerated help
text / docs / man page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Clarify step -a help text: both plain and _{n} stepper forms are valid (#1002)

Per review on #2190: descriptions like "E.g. delta_7 for 7 records
back" read as if the suffixed form were the only syntax. Reword the
shift, shift_lag, shift_lead, delta, and ratio descriptions to state
both forms explicitly -- e.g. "Use delta or equivalently delta_1 for
the previous record, or delta_{n} for n records back" -- using the {n}
placeholder style, and update the matching usage paragraph and
reference-verbs prose. Regenerate help-derived docs, man page, and
cli-help regression expectation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Give a specific error for invalid stepper count suffixes (#1002)

Per review on #2190: "mlr step -a delta_0" (or delta_-1, delta_x, etc.)
previously reported the generic 'stepper "delta_0" not found'. Now,
when the name prefixes a known count-suffix stepper (shift, shift_lag,
shift_lead, delta, ratio) but the suffix is not a positive integer, the
error is:

    mlr step: stepper "delta_0": count must be a positive integer

Truly unknown stepper names keep the existing "not found" message.
Adds should-fail regression cases for delta_0 and delta_-1, and unit
tests for the detection helper.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 16:39:48 -04:00
..
_static
coverart
data Add docs recipe: updating a CSV database file from a partial download (#826) (#2153) 2026-07-09 15:27:39 -04:00
images
javascripts
miller-as-library Multiple style updates (#1974) 2026-02-16 15:49:21 -05:00
multi-join
ngrams
perf Add PNG graphics to perf docs for issue-2084 perf mods (#2095) 2026-06-20 10:39:43 -04:00
pix More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
polyglot-dkvp-io
profiling
programs sieve2.mlr 2026-03-05 20:50:12 -05:00
tools
.vimrc
10min.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
10min.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
absent-example.json
agent-skill.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
agent-skill.md.in More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
ai-support.md Add mlr rank verb (#2178) 2026-07-07 17:35:18 -04:00
ai-support.md.in More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
ai.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
ai.md.in More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
build-one
build.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
build.md.in Use Go 1.24.5 (#1843) 2025-07-22 20:15:48 -04:00
circle.csv
commas.csv
community.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
community.md.in
context-example.mlr
contributing.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
contributing.md.in CONTRIBUTING.md 2026-07-05 10:35:41 -04:00
cpu.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
cpu.md.in
csv-with-and-without-headers.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
csv-with-and-without-headers.md.in
custom-record-formatting.mlr Add docs example on custom record-output formatting (#1989) 2026-02-22 12:45:45 -05:00
customization.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
customization.md.in
data-cleaning-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
data-cleaning-examples.md.in
data-diving-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
data-diving-examples.md.in
data-error.csv
date-time-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
date-time-examples.md.in
dates.csv
dkvp-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
dkvp-examples.md.in
doc-reorg.txt
dsl-example.mlr
etymology.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
etymology.md.in
example-mlr-s-script Fix mlr -s shebang doc and reject arrays/maps in contains/index (#1658) (#2058) 2026-05-17 11:40:39 -04:00
example-mlr-s-script-no-shebang
example-shell-script
example.csv
example.json
expo-sample.sh
extra.css Update extra.css (#1633) 2024-08-27 08:44:20 -04:00
factorial-example.mlr
features.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
features.md.in Add DCF (Debian Control Format) as supported file type (#1970) 2026-02-16 11:10:39 -05:00
file-formats.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
file-formats.md.in Document --lazy-quotes semantics for unmatched opening quotes (#999) (#2165) 2026-07-06 17:16:50 -04:00
flags.txt Add DKVPX file format (#2002) 2026-03-02 22:35:08 -05:00
flatten-unflatten.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
flatten-unflatten.md.in Fix section-title typos for docs in #1735 (#1736) 2024-12-23 14:19:51 -05:00
for-example.mlr
genmd-filter Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
genmds
glossary.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
glossary.md.in glossary entries for AI 2026-07-04 14:51:03 -04:00
gz-example.csv.gz
h1foo
h2foo
h3foo
how-to-release.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
how-to-release.md.in tools/release.sh + how-to-release.md.in: guard against tag-before-bump ordering bug (#2137) 2026-07-05 10:13:16 -04:00
if-example.mlr
index.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
index.md.in Add DCF (Debian Control Format) as supported file type (#1970) 2026-02-16 11:10:39 -05:00
installing-miller.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
installing-miller.md.in More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
internationalization.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
internationalization.md.in
keystroke-savers.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
keystroke-savers.md.in Default to "cat" verb when none is supplied (#2060) 2026-05-17 12:13:21 -04:00
kubectl-and-helm.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
kubectl-and-helm.md.in
link.txt
log-processing-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
log-processing-examples.md.in
log.txt
Makefile
manpage.md Allow more step -a options to specify the number of records back (#1002) (#2190) 2026-07-14 16:39:48 -04:00
manpage.md.in
manpage.txt Allow more step -a options to specify the number of records back (#1002) (#2190) 2026-07-14 16:39:48 -04:00
mcp-server.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
mcp-server.md.in More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
miller-as-library.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
miller-as-library.md.in
miller-on-windows.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
miller-on-windows.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
miller-programming-language.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
miller-programming-language.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
misc-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
misc-examples.md.in
missings.csv
missings.json
mk-flag-info.rb Add DCF (Debian Control Format) as supported file type (#1970) 2026-02-16 11:10:39 -05:00
mk-func-h2s.sh
mk-func-info.rb
mlr.1 cut: Consider -o flag even when using regexes with -r (#1823) 2025-07-03 18:54:09 -04:00
morph
morphs
new-in-miller-6.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
new-in-miller-6.md.in Update performance docs (#1991) 2026-02-22 17:04:35 -05:00
online-help.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
online-help.md.in
operating-on-all-fields.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
operating-on-all-fields.md.in
operating-on-all-records.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
operating-on-all-records.md.in
originality.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
originality.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
output-colorization.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
output-colorization.md.in
parsing-and-formatting-fields.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
parsing-and-formatting-fields.md.in
performance.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
performance.md.in typofix 2026-06-20 10:48:59 -04:00
programming-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
programming-examples.md.in
purple.csv.gz
questions-about-joins.md Add docs recipe: updating a CSV database file from a partial download (#826) (#2153) 2026-07-09 15:27:39 -04:00
questions-about-joins.md.in Add docs recipe: updating a CSV database file from a partial download (#826) (#2153) 2026-07-09 15:27:39 -04:00
questions-about-then-chaining.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
questions-about-then-chaining.md.in
randomizing-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
randomizing-examples.md.in
record-heterogeneity.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
record-heterogeneity.md.in Docs: worked example for combining CSV files with different headers (#1200) (#2148) 2026-07-06 16:57:21 -04:00
record-templating-example.mlr Add docs example on custom record-output formatting (#1989) 2026-02-22 12:45:45 -05:00
red.csv.gz
reference-dsl-builtin-functions.md Add sparkline DSL function and mlr sparkline verb (#166) (#2177) 2026-07-07 15:47:01 -04:00
reference-dsl-builtin-functions.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
reference-dsl-complexity.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-complexity.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
reference-dsl-control-structures.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-control-structures.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
reference-dsl-differences.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-differences.md.in
reference-dsl-errors.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-errors.md.in
reference-dsl-filter-statements.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-filter-statements.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
reference-dsl-higher-order-functions.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-higher-order-functions.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
reference-dsl-operators.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-operators.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
reference-dsl-output-statements.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-output-statements.md.in Replace GOCC parser-generator with PGPG (#2015) 2026-03-15 22:28:57 -04:00
reference-dsl-syntax.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-syntax.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
reference-dsl-time.md Support %a %A %e %h %c %x %X in strptime (#1518) (#2179) 2026-07-08 16:42:03 -04:00
reference-dsl-time.md.in Support %a %A %e %h %c %x %X in strptime (#1518) (#2179) 2026-07-08 16:42:03 -04:00
reference-dsl-unset-statements.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-unset-statements.md.in
reference-dsl-user-defined-functions.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-user-defined-functions.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
reference-dsl-variables.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl-variables.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
reference-dsl.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-dsl.md.in Require that filter expressions be boolean (or absent) (#1935) 2026-02-01 12:36:38 -05:00
reference-main-arithmetic.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-arithmetic.md.in
reference-main-arrays.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-arrays.md.in
reference-main-auxiliary-commands.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-auxiliary-commands.md.in
reference-main-compressed-data.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-compressed-data.md.in
reference-main-data-types.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-data-types.md.in Emit valid JSON numbers for floats like 004.56; document CSV quoting vs. type inference (#2151) 2026-07-05 20:19:32 -04:00
reference-main-env-vars.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-env-vars.md.in
reference-main-flag-list.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-flag-list.md.in
reference-main-in-place-processing.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-in-place-processing.md.in
reference-main-maps.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-maps.md.in
reference-main-null-data.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-null-data.md.in Fix doc typo re empty and multiplication (#1838) 2025-07-20 16:36:50 -04:00
reference-main-number-formatting.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-number-formatting.md.in
reference-main-overview.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-overview.md.in Default to "cat" verb when none is supplied (#2060) 2026-05-17 12:13:21 -04:00
reference-main-regular-expressions.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-regular-expressions.md.in
reference-main-separators.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-separators.md.in DKVPX reader: honor --ifs and --ips instead of hard-coding comma and equals (#2172) 2026-07-06 17:37:07 -04:00
reference-main-strings.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-strings.md.in
reference-main-then-chaining.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
reference-main-then-chaining.md.in
reference-verbs.md Allow more step -a options to specify the number of records back (#1002) (#2190) 2026-07-14 16:39:48 -04:00
reference-verbs.md.in Allow more step -a options to specify the number of records back (#1002) (#2190) 2026-07-14 16:39:48 -04:00
release-docs.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
release-docs.md.in Post-6.20.2 release: back to 6.20.2-dev 2026-07-04 15:44:14 -04:00
repl.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
repl.md.in
sample_mlrrc
scripting.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
scripting.md.in Fix mlr -s shebang doc and reject arrays/maps in contains/index (#1658) (#2058) 2026-05-17 11:40:39 -04:00
shapes-of-data.md Add docs recipe for transposing very wide CSV data (#321) (#2141) 2026-07-09 15:16:24 -04:00
shapes-of-data.md.in Add docs recipe for transposing very wide CSV data (#321) (#2141) 2026-07-09 15:16:24 -04:00
shell-commands.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
shell-commands.md.in
shell-completion.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
shell-completion.md.in Shell tab-completion for bash and zsh (#2096) 2026-06-21 12:47:54 -04:00
sorting.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
sorting.md.in
spaces.csv
special-symbols-and-formatting.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
special-symbols-and-formatting.md.in Add DKVPX file format (#2002) 2026-03-02 22:35:08 -05:00
split_circle.csv
split_square.csv
split_triangle.csv
sql-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
sql-examples.md.in
square.csv
statistics-examples.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
statistics-examples.md.in
streaming-and-memory.md Add mlr rank verb (#2178) 2026-07-07 17:35:18 -04:00
streaming-and-memory.md.in Add mlr rank verb (#2178) 2026-07-07 17:35:18 -04:00
structure-of-these-documents.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
structure-of-these-documents.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
swipes.sh Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
triangle.csv
troubleshooting-csv-and-json-input.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
troubleshooting-csv-and-json-input.md.in Document --lazy-quotes semantics for unmatched opening quotes (#999) (#2165) 2026-07-06 17:16:50 -04:00
two-pass-algorithms.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
two-pass-algorithms.md.in
unix-toolkit-context.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
unix-toolkit-context.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
variance.mlr
vimrc.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
vimrc.md.in
why.md Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
why.md.in Doc copy edits (#1827) 2025-07-04 13:43:22 -04:00
yellow.csv.gz
παράδειγμα.csv
пример.csv