MCPcopy Index your code
hub / github.com/anomalyco/opencode / shortenPath

Function shortenPath

packages/opencode/src/cli/cmd/uninstall.ts:347–353  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

345}
346
347function shortenPath(p: string): string {
348 const home = os.homedir()
349 if (p.startsWith(home)) {
350 return p.replace(home, "~")
351 }
352 return p
353}

Callers 1

showRemovalSummaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected