Skip to content

Commit c89848f

Browse files
committed
Fix
1 parent 8417290 commit c89848f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/elements/script.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ impl Script {
6363
let nest = feeder.nest.last()
6464
.expect(&error_message::internal_str("empty nest"));
6565

66+
if nest.0 == "" && feeder.len() == 0 {
67+
return Status::NormalEnd;
68+
}
69+
6670
match ( nest.1.iter().find(|e| feeder.starts_with(e)), self.jobs.len() ) {
6771
( Some(end), 0 ) => return Status::UnexpectedSymbol(end.to_string()),
6872
( Some(_), _) => return Status::NormalEnd,
@@ -75,10 +79,7 @@ impl Script {
7579
return Status::UnexpectedSymbol(first_token);
7680
}
7781

78-
match nest.1.len() {
79-
0 => Status::NormalEnd,
80-
_ => Status::NeedMoreLine,
81-
}
82+
Status::NeedMoreLine
8283
}
8384

8485
fn unalias(&mut self, core: &mut ShellCore) {

0 commit comments

Comments
 (0)