Skip to content

S2: output — isatty defaults, last-query rule, assertions, EPIPE/SIGINT discipline #6

Closed

Description

@david-Darkcollective

Part of #17. Design: docs/design.md §3.3, §3.4, §3.6.

Scope

  • Choosing a format. -o/--output and RELIX_OUTPUT. With neither, a terminal gets table and anything else gets tsv.
  • Modifiers:
    • --no-header (csv/tsv)
    • --null=STRING
    • --color=auto|always|never, honouring NO_COLOR
    • --line-buffered
  • Several queries in one script:
    • table prints each, labelled.
    • A machine format prints the last query, or the one named by --query=NAME (no short form: -q is --quiet, defined in S1).
    • --all with ndjson tags each row "_query": NAME. --all with any other machine format is a usage error.
  • Assertions: --fail-empty / --fail-rows exit 1.
  • Pipe discipline:
    • An EPIPE-aware RowSink closes the Stream<Tuple> on a write failure and exits 141 silently.
    • A SIGINT shutdown hook closes the active stream and the session, then exits 130.
    • Output goes through a buffered stdout, flushed per result set.

Dependencies

Acceptance

  • A sink that fails after N rows: assert the stream was closed and at most N+1 rows were pulled. This is a count, not a time.
  • -e 'Naturals' | head-style termination is tested.
  • The isatty default is tested both ways.

Activity

  1. added a commit that references this issue on Oct 8, 2026
    8ad6817
  2. github-actions commented on Oct 8, 2026

    @github-actions

    Done in #34, merged to develop (07435ac).

  3. added a commit that references this issue on Oct 12, 2026
    999e975
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

    area:cliThe relix command itselfbacklogNot yet scheduledenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions