Skip to main content

detect

Function detect 

Source
pub fn detect(
    home: &Path,
    rc_file_name: &str,
    dropin_dir_name: &str,
) -> Option<PathBuf>
Expand description

Detect whether the user’s rc file in home references the named drop-in directory and that directory exists. Returns the resolved directory path on success.

Arguments are kept generic so this works for .zshenv / .zshenv.d, .zshrc / .zshrc.d, .bashrc / .bashrc.d, etc.