feat(v0.5.2): direct lookup includes archived; resume hint for archived
Apply the v0.5.2 lookup policy to the existing commands and wire
ValidArgsFunction hooks across the workspace-accepting surface.
info: drop the --all/-a flag entirely. Direct lookup is now
archived-inclusive by default — the user typed a name, so we find
the workspace and surface its status in the output. The Status
line already distinguishes active vs archived clearly.
resume: when targeting an archived workspace, fail with a useful
hint instead of letting the resolver report "not found":
[ctask] error: workspace "X" is archived
To restore it:
ctask restore X
This is implemented by resolving archived-inclusive and rejecting
status==archived before any session-launch logic runs. Genuine
not-found and ambiguous-match behavior are unchanged.
Adds ValidArgsFunction hooks to archive (active), delete (active),
open (active), info (any), resume (active). Restore/notes/path
already have hooks from the previous commit. Shell completion now
covers the full direct-lookup surface.
This commit is contained in:
@@ -21,6 +21,7 @@ var archiveCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
archiveCmd.ValidArgsFunction = completeWorkspaces(completionActive)
|
||||
rootCmd.AddCommand(archiveCmd)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user