fixed empty arguments being filtered out during word splitting

This commit is contained in:
2026-02-16 19:09:10 -05:00
parent 142194c100
commit 12f36283ca
4 changed files with 16 additions and 12 deletions

View File

@@ -101,7 +101,7 @@ fn run_script<P: AsRef<Path>>(path: P, args: Vec<String>) -> ShResult<()> {
write_vars(|v| v.cur_scope_mut().bpush_arg(arg))
}
exec_input(input, None)
exec_input(input, None, false)
}
fn fern_interactive() -> ShResult<()> {
@@ -187,7 +187,7 @@ fn fern_interactive() -> ShResult<()> {
match readline.process_input() {
Ok(ReadlineEvent::Line(input)) => {
write_meta(|m| m.start_timer());
if let Err(e) = exec_input(input, None) {
if let Err(e) = exec_input(input, None, true) {
match e.kind() {
ShErrKind::CleanExit(code) => {
QUIT_CODE.store(*code, Ordering::SeqCst);