Skip to content

Commit 903de2c

Browse files
committed
Implement parameter expansion
1 parent 6fdc24e commit 903de2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/elements/word.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ pub struct Word {
1414
}
1515

1616
impl Word {
17-
pub fn eval(&mut self, _: &mut ShellCore) -> Option<Vec<String>> {
17+
pub fn eval(&mut self, core: &mut ShellCore) -> Option<Vec<String>> {
1818
let mut ws = brace_expansion::eval(self);
19+
for w in ws.iter_mut() {
20+
w.subwords.iter_mut().for_each(|sw| {sw.substitute(core); } );
21+
}
1922
Some( Self::make_args(&mut ws) )
2023
}
2124

0 commit comments

Comments
 (0)