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

Function splitPathFragment

cli/completer.go:124–137  ·  view source on GitHub ↗
(fragment string)

Source from the content-addressed store, hash-verified

122}
123
124func splitPathFragment(fragment string) (string, string) {
125 if fragment == "" {
126 return "", ""
127 }
128 cleaned := filepath.Clean(fragment)
129 if strings.HasSuffix(fragment, "/") || strings.HasSuffix(fragment, `\`) {
130 return cleaned, ""
131 }
132 dir := filepath.Dir(fragment)
133 if dir == "." {
134 dir = ""
135 }
136 return dir, filepath.Base(fragment)
137}
138
139func expandHome(path string) string {
140 if path == "~" {

Callers 1

CompleteVisiblePathsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected