fixed heredocs using the same expansion pathway as regular strings

implemented backtick command subs

deferred heredoc expansion until redir time instead of parse time

implemented "$*" expansions

function defs like 'func   ()  { }' now parse correctly

fixed conjunctions short circuiting instead of skipping
This commit is contained in:
2026-03-15 00:01:33 -04:00
parent 9bd9c66b92
commit 101d8434f8
8 changed files with 278 additions and 84 deletions

View File

@@ -95,14 +95,16 @@ pub fn sort_tks(
.into_iter()
.map(|t| t.expand())
.collect::<ShResult<Vec<_>>>()?
.into_iter();
.into_iter()
.peekable();
let mut opts = vec![];
let mut non_opts = vec![];
while let Some(token) = tokens_iter.next() {
if &token.to_string() == "--" {
non_opts.extend(tokens_iter);
break;
non_opts.push(token);
non_opts.extend(tokens_iter);
break;
}
let parsed_opts = Opt::parse(&token.to_string());