File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ pub fn wrap_command(command: &str, test_mode: bool) -> String {
25
25
26
26
match shell_type. as_str ( ) {
27
27
"zsh" => format ! (
28
- r#"emulate zsh ; if [ -f ~/.zshrc ]; then . ~/.zshrc >/dev/null 2>&1 ; fi; {}"# ,
28
+ r#"setopt no_global_rcs ; if [ -f ~/.zshrc ]; then ZDOTDIR=~ source ~/.zshrc; fi; {}"# ,
29
29
clean_command
30
30
) ,
31
31
"fish" => format ! (
@@ -81,8 +81,8 @@ pub fn execute_shell_command(ctx: &ExecutionContext) -> Result<()> {
81
81
if ctx. test_mode {
82
82
command. args ( & [ "-c" , & wrapped_command] ) ;
83
83
} else {
84
- // Use -c for both interactive and non- interactive mode to ensure consistent behavior
85
- command. args ( & [ "-c" , & wrapped_command] ) ;
84
+ // Use -i for all shells in interactive mode to ensure proper initialization
85
+ command. args ( & [ "-i" , "- c", & wrapped_command] ) ;
86
86
}
87
87
88
88
// Set working directory
You can’t perform that action at this time.
0 commit comments