MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / expandHome

Function expandHome

cli/completer.go:139–152  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

137}
138
139func expandHome(path string) string {
140 if path == "~" {
141 if home, err := os.UserHomeDir(); err == nil {
142 return home
143 }
144 return path
145 }
146 if strings.HasPrefix(path, "~/") {
147 if home, err := os.UserHomeDir(); err == nil {
148 return filepath.Join(home, path[2:])
149 }
150 }
151 return path
152}

Callers 1

CompleteVisiblePathsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected