MCPcopy Create free account
hub / github.com/52funny/pikpakcli / relativeRemotePath

Function relativeRemotePath

internal/shell/shell.go:976–987  ·  view source on GitHub ↗
(basePath string, fullPath string)

Source from the content-addressed store, hash-verified

974}
975
976func relativeRemotePath(basePath string, fullPath string) string {
977 base := path.Clean(basePath)
978 full := path.Clean(fullPath)
979 if base == "/" {
980 return strings.TrimPrefix(full, "/")
981 }
982 prefix := base + "/"
983 if strings.HasPrefix(full, prefix) {
984 return strings.TrimPrefix(full, prefix)
985 }
986 return full
987}
988
989func splitCompletionLine(input string) ([]string, string, bool) {
990 args := make([]string, 0)

Callers 1

expandRemotePatternTokenFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected