From f1cc2adc3bbbf08c1c08444653d40cfb8f38c305 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 22 Mar 2026 22:29:49 +0200 Subject: ask: fix filter argument ordering for list/all/ready commands Filters like +tag must come before the 'export' action in task commands. Previously filters were appended after 'export' causing 'ask list +integrationtest' to fail. --- cmd/ask/ask | Bin 3528033 -> 3528465 bytes internal/askcli/command_list.go | 9 ++++++--- internal/version.go | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/ask/ask b/cmd/ask/ask index 9990730..3dce495 100755 Binary files a/cmd/ask/ask and b/cmd/ask/ask differ diff --git a/internal/askcli/command_list.go b/internal/askcli/command_list.go index 82b7ff5..64ec2fb 100644 --- a/internal/askcli/command_list.go +++ b/internal/askcli/command_list.go @@ -9,13 +9,14 @@ import ( ) func (d Dispatcher) handleList(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) { - filterArgs := []string{"status:pending", "export"} + filterArgs := []string{"status:pending"} for _, arg := range args[1:] { if strings.HasPrefix(arg, "limit:") || strings.HasPrefix(arg, "sort:") || strings.HasPrefix(arg, "+") || arg == "started" { filterArgs = append(filterArgs, arg) } } + filterArgs = append(filterArgs, "export") var outBuf bytes.Buffer code, err := d.runner.Run(ctx, filterArgs, nil, &outBuf, stderr) if code != 0 { @@ -38,13 +39,14 @@ func (d Dispatcher) handleList(ctx context.Context, args []string, stdout, stder } func (d Dispatcher) handleAll(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) { - filterArgs := []string{"export"} + filterArgs := []string{} for _, arg := range args[1:] { if strings.HasPrefix(arg, "limit:") || strings.HasPrefix(arg, "sort:") || strings.HasPrefix(arg, "+") || arg == "started" { filterArgs = append(filterArgs, arg) } } + filterArgs = append(filterArgs, "export") var outBuf bytes.Buffer code, err := d.runner.Run(ctx, filterArgs, nil, &outBuf, stderr) if code != 0 { @@ -67,13 +69,14 @@ func (d Dispatcher) handleAll(ctx context.Context, args []string, stdout, stderr } func (d Dispatcher) handleReady(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) { - filterArgs := []string{"+READY", "export"} + filterArgs := []string{"+READY"} for _, arg := range args[1:] { if strings.HasPrefix(arg, "limit:") || strings.HasPrefix(arg, "sort:") || strings.HasPrefix(arg, "+") || arg == "started" { filterArgs = append(filterArgs, arg) } } + filterArgs = append(filterArgs, "export") var outBuf bytes.Buffer code, err := d.runner.Run(ctx, filterArgs, nil, &outBuf, stderr) if code != 0 { diff --git a/internal/version.go b/internal/version.go index b73ef9e..e88f3fa 100644 --- a/internal/version.go +++ b/internal/version.go @@ -1,4 +1,4 @@ // Package internal provides the Hexai semantic version identifier used by CLI and LSP binaries. package internal -const Version = "0.25.3" +const Version = "0.25.4" -- cgit v1.2.3