diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-26 10:15:58 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-26 10:15:58 +0300 |
| commit | 0088bf27368265511d6ff3c49309df843c528d42 (patch) | |
| tree | 321becbc133e59dc2be31ec27fd1a6a69e8d7ca7 /internal/askcli/dispatch_test.go | |
| parent | c4ffb4b994faa3df1760cd1144a8dafcefeb991b (diff) | |
feat(askcli): add watch subcommand
Implements `ask watch [subcommand...]` which re-runs a read-only
subcommand every 2 seconds and redraws output when it changes,
similar to gnu-watch.
Safety features:
- Restricted to read-only subcommands (list, all, ready, info,
urgency, help, dep list)
- Recursive watch is blocked
- Captures stderr so error messages are visible in the watched display
Also adds readOnly field to commandEntry registry for maintainability.
Diffstat (limited to 'internal/askcli/dispatch_test.go')
| -rw-r--r-- | internal/askcli/dispatch_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/askcli/dispatch_test.go b/internal/askcli/dispatch_test.go index 20062b0..986b5e1 100644 --- a/internal/askcli/dispatch_test.go +++ b/internal/askcli/dispatch_test.go @@ -203,7 +203,7 @@ func TestDispatcher_LongHelp(t *testing.T) { var stdout bytes.Buffer d.Dispatch(context.Background(), []string{"help"}, nil, &stdout, io.Discard) output := stdout.String() - for _, sub := range []string{"add", "list", "all", "ready", "info", "annotate", "start", "stop", "done", "priority", "tag", "dep", "urgency", "modify", "denotate", "delete", "fish"} { + for _, sub := range []string{"add", "list", "all", "ready", "info", "annotate", "start", "stop", "done", "priority", "tag", "dep", "urgency", "watch", "modify", "denotate", "delete", "fish"} { if !strings.Contains(output, "ask "+sub) { t.Errorf("help missing subcommand: ask %s", sub) } |
