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

Function resolveShellPath

internal/shell/shell.go:621–632  ·  view source on GitHub ↗
(currentPath string, target string)

Source from the content-addressed store, hash-verified

619}
620
621func resolveShellPath(currentPath string, target string) string {
622 switch strings.TrimSpace(target) {
623 case "", "~", "/":
624 return "/"
625 }
626
627 if strings.HasPrefix(target, "/") {
628 return path.Clean(target)
629 }
630
631 return path.Clean(path.Join(currentPath, target))
632}
633
634func expandOpenGlobs(currentPath string, source fileStatProvider, args []string) ([]string, error) {
635 expanded := make([]string, 0, len(args))

Callers 6

completeRemotePathMethod · 0.85
rewritePathFlagValuesFunction · 0.85
rewritePositionalPathsFunction · 0.85
changeDirectoryFunction · 0.85
handleOpenCommandFunction · 0.85
TestResolveShellPathFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestResolveShellPathFunction · 0.68