Skip to content

rendertree: replace or deprecate the delimiter-based --custom mini-language #14

Description

@apstndb

Problem

The --custom flag uses an ad-hoc mini-language with two layers of delimiter-based parsing:

  • stringList.Set splits the flag value on ,
  • customListToTableRenderDef then splits each item on :

Relevant code:

  • cmd/rendertree/impl/impl.go:218-225
  • cmd/rendertree/impl/impl.go:551-594

This means some otherwise valid Go template expressions cannot be represented on the command line, especially when a column name or template needs a literal , or :.

Why this matters

--custom is documented in the README as a supported way to define custom columns, but the current format is much more fragile than --custom-file.

Examples that are awkward or impossible today:

  • string literals containing : or ,
  • templates that want to emit those characters literally
  • future extensions that need additional structured fields without making the grammar even more ambiguous

Expected behavior

The CLI should provide one of these:

  1. A structured repeatable flag format that does not depend on raw , and : splitting.
  2. Escaping/quoting rules for the current mini-language.
  3. A clear deprecation path for --custom in favor of --custom-file.

Suggested direction

I would prefer deprecating --custom and steering users toward --custom-file, unless there is a strong need to keep the inline syntax.

If --custom stays, it should become a repeatable structured flag rather than a hand-rolled CSV-like grammar.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions