Skip to content

Complete log names for logs and task names for run - #48

Merged
hiyamamo merged 1 commit into
mainfrom
completion-logs-tasks
Jul 19, 2026
Merged

hiyamamo merged 1 commit into
mainfrom
completion-logs-tasks

Conversation

@hiyamamo

Copy link
Copy Markdown
Owner

Summary

  • ws-dev logs <wt> <TAB> now suggests the *.log basenames from the target worktree's log dir (same resolution as the command itself: config + $WS_DEV_LOG_DIR).
  • ws-dev run <TAB> suggests worktree names and task names; after a worktree, the second arg suggests task names; after a task name, nothing (extra args are passthrough) — exactly mirroring splitRunArgs.
  • Task suggestions are sorted (the tasks: map has no order, so completion would otherwise jitter). Every failure path (unregistered repo, unresolvable worktree, missing log dir) degrades to "no suggestions", consistent with the existing worktree completion.
  • Verified ValidArgsFunction fires despite run's DisableFlagParsing via __complete smoke tests (worktree+tasks, tasks-after-worktree, none-after-task all behave).

Closes #31

Test plan

  • New TestTaskNames (prefix filtering + sorted output)
  • __complete smoke tests against a throwaway $WS_DEV_CONFIG
  • make check passes

🤖 Generated with Claude Code

`logs` now completes its second positional arg with the *.log names in
the target worktree's log dir, and `run` completes worktrees + task
names for its first arg (mirroring splitRunArgs) and task names for the
second when the first named a worktree. Task suggestions are sorted for
stable output; any resolution failure degrades to no suggestions, as
the worktree completion already did.

Closes #31

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hiyamamo
hiyamamo merged commit 470bab6 into main Jul 19, 2026
3 checks passed
@hiyamamo
hiyamamo deleted the completion-logs-tasks branch July 19, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

シェル補完: logs のログ名と run/タスク名を補完する

1 participant