Input types for fragjan ask: line, editor, selection #14

Open
opened 2026-11-05 20:55:56 +01:00 by michael · 0 comments
Owner

Problem

fragjan ask needs more than confirm() and the form prompt():
single-line answers, multi-line Markdown answers and selections.
berhtjan-cli has no public function for these yet.

Scope

Map the closed vocabulary of daw_field_type/v1 (acquisition.kind,
cardinality, collection.source, hint); never switch on the open
value.kind:

  • direct, no multiline hint: one line, returned raw (the meaning of
    empty, - or q belongs to the caller)
  • direct with multiline: open $EDITOR via
    sys:run_interactive() on a path the caller supplies;
    $EDITOR not set is an error, no fallback editor
  • selection, single / multiple, static: choice by number(s)
  • out of scope: selection with resolved, resource
  • EOF is input_ended, as in prompt() and confirm()

Acceptance criteria

  • signatures agreed before implementation
  • own texts as daw_i18n/v1 resources, resource_id per error site
  • fragjan code . and make test (5.1 and 5.4) pass

DAW/fragjan#137

## Problem fragjan `ask` needs more than `confirm()` and the form `prompt()`: single-line answers, multi-line Markdown answers and selections. berhtjan-cli has no public function for these yet. ## Scope Map the closed vocabulary of daw_field_type/v1 (`acquisition.kind`, `cardinality`, `collection.source`, `hint`); never switch on the open `value.kind`: - `direct`, no `multiline` hint: one line, returned raw (the meaning of empty, `-` or `q` belongs to the caller) - `direct` with `multiline`: open `$EDITOR` via `sys:run_interactive()` on a path the caller supplies; `$EDITOR` not set is an error, no fallback editor - `selection`, `single` / `multiple`, `static`: choice by number(s) - out of scope: `selection` with `resolved`, `resource` - EOF is `input_ended`, as in `prompt()` and `confirm()` ## Acceptance criteria - [ ] signatures agreed before implementation - [ ] own texts as daw_i18n/v1 resources, resource_id per error site - [ ] fragjan code . and make test (5.1 and 5.4) pass ## Related DAW/fragjan#137
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/daw-modul-berhtjan-cli#14
No description provided.