MCPcopy
hub / github.com/Fission-AI/OpenSpec / getCommandPath

Function getCommandPath

src/cli/index.ts:90–104  ·  view source on GitHub ↗
(command: Command)

Source from the content-addressed store, hash-verified

88 * For example: 'change show' -> 'change:show'
89 */
90export function getCommandPath(command: Command): string {
91 const names: string[] = [];
92 let current: Command | null = command;
93
94 while (current) {
95 const name = current.name();
96 // Skip the root 'openspec' command
97 if (name && name !== 'openspec') {
98 names.unshift(name);
99 }
100 current = current.parent;
101 }
102
103 return names.join(':') || 'openspec';
104}
105
106program
107 .name('openspec')

Callers 2

index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected