mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 00:45:47 +00:00
* initial attempt
* fix bash
* fix zsh
* Add shell-completion docs page
Documents the new 'mlr completion {bash,zsh}' feature: the then-chain
context model, install instructions for bash and zsh (including the macOS
bash-3.2 'eval' caveat and zsh compinit self-init), and examples of
context-aware completion. Added to the nav under "Miller in more detail".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Add enum value completion for format and separator flags
Completes the argument value for arg-taking main flags whose values are a
known set: file-format names for -i/-o/--io, separator aliases for
--ifs/--ofs/--ips/etc., and regex-separator aliases for --ifs-regex/--ips-regex.
Other arg-taking flags continue to fall back to filename completion.
Candidate sets come from new cli getters (GetFileFormatNames,
GetSeparatorAliasNames, GetSeparatorRegexAliasNames) that read the same maps
Miller uses at runtime, so there is no separate list to keep in sync. The
command-line walk now records which flag a value position belongs to.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Include format-conversion keystroke-savers in bare-dash completion
Reverts the suppression of --c2j/--x2y-style flags from 'mlr -<TAB>'. The full
set of main flags (297) is now offered, matching what is valid on the command
line. GetFlagNames no longer takes an includeSuppressed argument.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Complete terminal subcommands and top-level help/version flags
'mlr <TAB>' now offers subcommand names (help, version, repl, regtest, script,
completion, terminal-list) alongside verb names, and 'mlr -<TAB>' offers the
top-level terminal flags (-h, --help, --version, --bare-version, and the help
shorthands -g/-l/-L/-f/-F/-k/-K). Subcommand names are offered only as the
first non-flag token, where they are valid.
To let the completion engine know these names without an import cycle
(pkg/terminals imports pkg/terminals/completion), the canonical terminal names
and version-flag spellings are factored into a new leaf package
pkg/terminals/registry, imported by pkg/terminals, pkg/climain, and completion.
The help-flag spellings come from a new help.GetTerminalFlagNames derived from
the existing shorthand table, so nothing drifts.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Complete 'mlr help' topics and topic arguments
'mlr help <TAB>' now completes help topics (flags, verb, function, keyword,
list-verbs, ...), and topics that take a name argument complete it too:
'mlr help verb <TAB>' -> verb names, 'mlr help function <TAB>' -> function
names, 'mlr help keyword <TAB>' -> keyword names, 'mlr help flag <TAB>' ->
flag names. 'mlr completion <TAB>' completes bash/zsh.
A terminal subcommand consumes the rest of the command line, so the walk now
returns a ctxTerminalArgs context carrying the terminal name and the words
typed after it. New getters supply the candidate names without drift:
help.GetTopicNames, help.GetFunctionNames/GetKeywordNames (wrapping new
cst.BuiltinFunctionManager.GetBuiltinFunctionNames and cst.GetKeywordNames).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs-neaten
* Move flag-value-candidate logic into pkg/cli; fix verb-flag collision
The mapping of which flags take a format/separator/regex-separator argument is
flag metadata, so it now lives with the flags in pkg/cli as
cli.FlagValueCandidates, alongside the existing GetFileFormatNames /
GetSeparatorAliasNames getters, replacing the maps that were in
pkg/terminals/completion/value_completion.go (now removed).
This also fixes a bug: value completion now applies only to main flags, not to
identically-spelled verb flags. Previously 'mlr uniq -o <TAB>' offered file
formats because uniq's -o (an output field name) collided with the main -o
format flag; it now correctly falls back to filename completion.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
127 lines
5.6 KiB
YAML
127 lines
5.6 KiB
YAML
site_name: Miller Dev Documentation
|
|
theme:
|
|
name: material
|
|
favicon: images/favicon.ico
|
|
logo: images/favicon.png
|
|
font:
|
|
text: Lato
|
|
code: Lato Mono
|
|
features:
|
|
- navigation.top
|
|
- content.action.edit
|
|
- content.action.view
|
|
custom_dir: overrides
|
|
repo_url: https://github.com/johnkerl/miller
|
|
repo_name: miller
|
|
edit_uri: edit/main/docs/src
|
|
docs_dir: './src'
|
|
extra_css: ['extra.css']
|
|
extra_javascript:
|
|
- https://cdnjs.cloudflare.com/ajax/libs/tablesort/5.2.1/tablesort.min.js
|
|
- javascripts/tables.js
|
|
nav:
|
|
- "Introduction": "index.md"
|
|
- 'Getting started':
|
|
- "Installing Miller": "installing-miller.md"
|
|
- "Miller in 10 minutes": "10min.md"
|
|
- "Keystroke-savers": "keystroke-savers.md"
|
|
- "Intro to Miller's programming language": "miller-programming-language.md"
|
|
- "Miller on Windows": "miller-on-windows.md"
|
|
- "Community": "community.md"
|
|
- "Structure of these documents": "structure-of-these-documents.md"
|
|
- 'Miller in more detail':
|
|
- "Features": "features.md"
|
|
- "File formats": "file-formats.md"
|
|
- "Unix-toolkit context": "unix-toolkit-context.md"
|
|
- "Record-heterogeneity": "record-heterogeneity.md"
|
|
- "Internationalization": "internationalization.md"
|
|
- "Output colorization": "output-colorization.md"
|
|
- "Customization: .mlrrc": "customization.md"
|
|
- "Shell completion": "shell-completion.md"
|
|
- "Syntax highlighting: vimrc": "vimrc.md"
|
|
- "The REPL": "repl.md"
|
|
- "Online help": "online-help.md"
|
|
- "How to contribute": "contributing.md"
|
|
- 'FAQs and examples':
|
|
- "CSV, with and without headers": "csv-with-and-without-headers.md"
|
|
- "Shapes of data": "shapes-of-data.md"
|
|
- "Operating on all fields": "operating-on-all-fields.md"
|
|
- "Operating on all records": "operating-on-all-records.md"
|
|
- "Questions about then-chaining": "questions-about-then-chaining.md"
|
|
- "Questions about joins": "questions-about-joins.md"
|
|
- "Date/time examples": "date-time-examples.md"
|
|
- "Special symbols and formatting": "special-symbols-and-formatting.md"
|
|
- "Running shell commands": "shell-commands.md"
|
|
- "Data-cleaning examples": "data-cleaning-examples.md"
|
|
- "Data-diving examples": "data-diving-examples.md"
|
|
- "Log-processing examples": "log-processing-examples.md"
|
|
- "SQL examples": "sql-examples.md"
|
|
- "Processing Kubectl and Helm output": "kubectl-and-helm.md"
|
|
- "DKVP I/O examples": "dkvp-examples.md"
|
|
- "Statistics examples": "statistics-examples.md"
|
|
- "Randomizing examples": "randomizing-examples.md"
|
|
- "Two-pass algorithms": "two-pass-algorithms.md"
|
|
- "Programming-language examples": "programming-examples.md"
|
|
- "Miscellaneous examples": "misc-examples.md"
|
|
- 'Main reference':
|
|
- "Miller command structure": "reference-main-overview.md"
|
|
- "Then-chaining": "reference-main-then-chaining.md"
|
|
- "List of command-line flags": "reference-main-flag-list.md"
|
|
- "List of verbs": "reference-verbs.md"
|
|
- "In-place mode": "reference-main-in-place-processing.md"
|
|
- "Number formatting": "reference-main-number-formatting.md"
|
|
- "Separators": "reference-main-separators.md"
|
|
- "Parsing and formatting fields": "parsing-and-formatting-fields.md"
|
|
- "Flatten/unflatten: converting between JSON and tabular formats": "flatten-unflatten.md"
|
|
- "Sorting": "sorting.md"
|
|
- "Streaming processing, and memory usage": "streaming-and-memory.md"
|
|
- "Compressed data": "reference-main-compressed-data.md"
|
|
- "CPU/multicore usage": "cpu.md"
|
|
- "Scripting with Miller": "scripting.md"
|
|
- "Miller environment variables": "reference-main-env-vars.md"
|
|
- "Performance": "performance.md"
|
|
- 'Types reference':
|
|
- "Data types": "reference-main-data-types.md"
|
|
- "Strings": "reference-main-strings.md"
|
|
- "Regular expressions": "reference-main-regular-expressions.md"
|
|
- "Arithmetic": "reference-main-arithmetic.md"
|
|
- "Maps": "reference-main-maps.md"
|
|
- "Arrays": "reference-main-arrays.md"
|
|
- "Null/empty/absent data": "reference-main-null-data.md"
|
|
- 'DSL reference':
|
|
- "DSL overview": "reference-dsl.md"
|
|
- "DSL syntax": "reference-dsl-syntax.md"
|
|
- "DSL variables": "reference-dsl-variables.md"
|
|
- "DSL control structures": "reference-dsl-control-structures.md"
|
|
- "DSL operators": "reference-dsl-operators.md"
|
|
- "DSL built-in functions": "reference-dsl-builtin-functions.md"
|
|
- "DSL user-defined functions": "reference-dsl-user-defined-functions.md"
|
|
- "DSL higher-order functions": "reference-dsl-higher-order-functions.md"
|
|
- "DSL filter statements": "reference-dsl-filter-statements.md"
|
|
- "DSL output statements": "reference-dsl-output-statements.md"
|
|
- "DSL unset statements": "reference-dsl-unset-statements.md"
|
|
- "DSL datetime/timezone functions": "reference-dsl-time.md"
|
|
- "DSL errors and transparency": "reference-dsl-errors.md"
|
|
- "Differences from other programming languages": "reference-dsl-differences.md"
|
|
- "A note on the complexity of Miller's expression language": "reference-dsl-complexity.md"
|
|
- 'Background':
|
|
- "Why?": "why.md"
|
|
- "Why call it Miller?": "etymology.md"
|
|
- "How original is Miller?": "originality.md"
|
|
- 'Misc. reference':
|
|
- "Auxiliary commands": "reference-main-auxiliary-commands.md"
|
|
- "Manual page": "manpage.md"
|
|
- "Building from source": "build.md"
|
|
- "Miller as a library": "miller-as-library.md"
|
|
- "How to create a new release": "how-to-release.md"
|
|
- "Documents for previous releases": "release-docs.md"
|
|
- "Glossary": "glossary.md"
|
|
- "What's new in Miller 6": "new-in-miller-6.md"
|
|
|
|
markdown_extensions:
|
|
- toc:
|
|
permalink: true
|
|
- admonition
|
|
- pymdownx.details
|
|
- pymdownx.superfences
|
|
|