diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-10 22:47:34 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-10 22:47:34 +0300 |
| commit | ea9e7c0225f6af8179890516b5ce9d511dadb234 (patch) | |
| tree | e5d64837c8823d315af40162cf5f10491a06b755 /internal/askcli/dispatch.go | |
| parent | bd749f8e9a0eeaa5578a368996f7b93955580a39 (diff) | |
task 30: add proj prefix override for do
Diffstat (limited to 'internal/askcli/dispatch.go')
| -rw-r--r-- | internal/askcli/dispatch.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/askcli/dispatch.go b/internal/askcli/dispatch.go index 3167421..69310c7 100644 --- a/internal/askcli/dispatch.go +++ b/internal/askcli/dispatch.go @@ -45,8 +45,11 @@ func parseGlobalFlags(args []string) ([]string, bool) { func (d *Dispatcher) Dispatch(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) (int, error) { args, jsonOutput := parseGlobalFlags(args) d.jsonOutput = jsonOutput - scope, args := parseTaskScopePrefix(args) + scope, projectName, projectSet, args := parseTaskPrefixes(args) ctx = contextWithTaskScope(ctx, scope) + if projectSet { + ctx = contextWithTaskProject(ctx, projectName) + } if len(args) == 0 { args = []string{"list"} @@ -66,6 +69,8 @@ func (d *Dispatcher) Dispatch(ctx context.Context, args []string, stdin io.Reade func (d *Dispatcher) help(w io.Writer) (int, error) { _, _ = io.WriteString(w, "do - task management CLI\n") + _, _ = io.WriteString(w, "\nProject prefixes:\n") + _, _ = io.WriteString(w, " do proj:<name> <subcommand...> Run a subcommand against an explicit project\n") _, _ = io.WriteString(w, "\nScope prefixes:\n") _, _ = io.WriteString(w, " do na <subcommand...> Run a subcommand against project tasks without +agent\n") _, _ = io.WriteString(w, " do no-agent <subcommand...> Alias for do na\n") |
