Skip to main content

search_defpath

Function search_defpath 

Source
pub fn search_defpath(cmd: &str, plen: usize) -> Option<String>
Expand description

Port of static char *search_defpath(char *cmd, char *pbuf, int plen) from Src/exec.c:691.

Walk DEFAULT_PATH for an executable <dir>/<cmd> regular file. Used by command -p to bypass the user’s $PATH and search the system default (/bin:/usr/bin:...).