Added more accurate logic for @ expansion

This commit is contained in:
2026-02-23 21:16:29 -05:00
parent 9361c561b4
commit 39893b3a1f
2 changed files with 9 additions and 10 deletions

View File

@@ -10,16 +10,10 @@ use std::{
use nix::unistd::{User, gethostname, getppid};
use crate::{
builtin::trap::TrapTarget,
exec_input,
jobs::JobTab,
libsh::{
builtin::trap::TrapTarget, exec_input, expand::ARG_SEP, jobs::JobTab, libsh::{
error::{ShErr, ShErrKind, ShResult},
utils::VecDequeExt,
},
parse::{ConjunctNode, NdRule, Node, ParsedSrc},
prelude::*,
shopt::ShOpts,
}, parse::{ConjunctNode, NdRule, Node, ParsedSrc}, prelude::*, shopt::ShOpts
};
pub struct Fern {
@@ -603,7 +597,7 @@ impl VarTab {
fn update_arg_params(&mut self) {
self.set_param(
ShellParam::AllArgs,
&self.sh_argv.clone().to_vec()[1..].join(" "),
&self.sh_argv.clone().to_vec()[1..].join(&ARG_SEP.to_string()),
);
self.set_param(ShellParam::ArgCount, &(self.sh_argv.len() - 1).to_string());
}