47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/dev_context/commands/help.rb', line 47
def cmd_help_topic(command)
text = case command
when "status", "wip"
"Usage: dx status [--all] [--dirty] [-b BRANCHPATTERN] [-p PATHPATTERN]\n dx wip [--all] [--dirty] [-b BRANCHPATTERN] [-p PATHPATTERN]\n\nShow branch and git status for active contexts. Use --all for all known repos, --dirty to filter non-clean repos, and -b/-p to filter by branch/path."
when "repos"
"Usage: dx repos [-b BRANCHPATTERN] [-p PATHPATTERN] [PATTERN]\n\nList all known repos without git status details. PATTERN is shorthand for path filtering."
when "stashes"
"Usage: dx stashes [--list] [PATTERN]\n\nShow repos with stashes. Provide PATTERN to filter stash titles; use --list to print matching entries."
when "find"
"Usage: dx find [--stashes|--branches|--paths] <pattern>\n dx find --all\n\nSearch stash titles, branches, and repo paths. Use --all to show likely-forgotten work."
when "doctor", "check"
"Usage: dx doctor\n dx check\n\nRun environment and config diagnostics."
when "init"
"Usage: dx init [ruby|go|elixir]\n\nInitialize dx files. If IMPL is given, set DX_IMPL non-interactively."
when "version"
"Usage: dx version\n dx --version\n dx -V\n\nPrint the active dx implementation and version."
when "add"
"Usage: dx add [-c NAME] [-n] [-v] PATH|URL ..."
when "clone"
"Usage: dx clone [-c NAME] [-n] [-v] URL [PATH]"
when "create"
"Usage: dx create [-c NAME] [-n] [-v] NAME [PATH] [BRANCH]"
when "activate", "cd"
"Usage: dx #{command} CONTEXT|PATH|URL"
when "pushd"
"Usage: dx pushd [CONTEXT|PATH|URL|+N|-N]\n\nCONTEXT accepts exact or fuzzy-matched context names. PATH and URL resolve/create contexts. +N/-N select existing active-stack entries (+0 top/left, -0 bottom/right) and rotate that entry to top."
when "popd"
"Usage: dx popd [CONTEXT|+N|-N]\n\nWith no args, same as `dx popd +0`. CONTEXT accepts exact or fuzzy-matched context names. +N counts from top/left (+0 top), -N from bottom/right (-0 bottom)."
when "remove"
"Usage: dx remove CONTEXT|PATH"
when "diff"
"Usage: dx diff [CONTEXT]"
when "branches", "br"
"Usage: dx branches|br [CONTEXT|PATTERN]\n\nWith a context, list git branches in that repo. With PATTERN, find repos whose current branch matches."
when "checkout", "co"
"Usage: dx checkout|co [-b] FEATURE [CONTEXT]"
else
"Usage: dx #{command}"
end
out.puts(text)
0
end
|