Skip to main content

bash_exec_env_diff

Function bash_exec_env_diff 

Source
pub fn bash_exec_env_diff(command: &str) -> i32
Expand description

Execute a command through bash and only print environment diff as fish commands. No command output is shown — both stdout and stderr are suppressed. Used to source bash scripts and capture their environment side effects.

Returns the bash command’s exit code.

§Examples

use reef::passthrough::bash_exec_env_diff;

// Source a bash script, capturing only env changes
let exit_code = bash_exec_env_diff("source ~/.bashrc");
// Fish `set -gx` commands for any new/changed vars are on stdout