(currentPath string, target string)
| 619 | } |
| 620 | |
| 621 | func 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 | |
| 634 | func expandOpenGlobs(currentPath string, source fileStatProvider, args []string) ([]string, error) { |
| 635 | expanded := make([]string, 0, len(args)) |
no outgoing calls