Skip to main content

run_alias_from_env

Function run_alias_from_env 

Source
pub fn run_alias_from_env() -> Result<i32>
Expand description

Parse process args as the run alias binary, detect the current dir, dispatch, and return the exit code.

Always treats positional arguments as a task or command (routed through [cmd::run]) — built-in subcommand names are never parsed specially, so run clean, run install, etc. run the corresponding task/command.

When the COMPLETE environment variable is set, writes shell completions to stdout and exits without running the normal command dispatch.

§Errors

Returns an error when reading current dir fails, project detection fails, command execution fails, or writing clap output fails.

Argument parsing/help/version flows are rendered by clap and returned as an exit code instead of terminating the host process.