Skip to main content

validate_shell_syntax

Function validate_shell_syntax 

Source
pub fn validate_shell_syntax(path: &Path, shell: &str) -> Result<(), Error>
Expand description

Validate shell config syntax by running bash -n or zsh -n on the file.

Returns Ok(()) if valid or if the shell is not available. Returns Err with details if the syntax check fails.