mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-04 10:57:50 +08:00
parent
d410a3fd40
commit
cffc728530
|
@ -47,10 +47,7 @@ func AllExecutables(paths []string, names chan<- string) {
|
|||
// DontSearch determines whether the path to an external command should be
|
||||
// taken literally and not searched.
|
||||
func DontSearch(exe string) bool {
|
||||
return exe == ".." ||
|
||||
strings.HasPrefix(exe, "/") ||
|
||||
strings.HasPrefix(exe, "./") ||
|
||||
strings.HasPrefix(exe, "../")
|
||||
return exe == ".." || strings.ContainsRune(exe, '/')
|
||||
}
|
||||
|
||||
// IsExecutable determines whether path refers to an executable file.
|
||||
|
|
Loading…
Reference in New Issue
Block a user