Skip to content

Commit

Permalink
Fix alias expansion rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuichiueda committed Dec 22, 2024
1 parent fa8fa41 commit 4b9bd1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/elements/command/simple/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ impl SimpleCommand {
ans.permit_substitution_arg = true;
}
}
if Self::set_alias(&w, &mut ans.words, &mut ans.text, core, feeder) {
return true;

if ans.words.len() == 0 {
if Self::set_alias(&w, &mut ans.words, &mut ans.text, core, feeder) {
return true;
}
}

ans.text += &w.text;
Expand Down

0 comments on commit 4b9bd1d

Please sign in to comment.