Fixed bug where it crashed if no input was entered

pull/3/head
ams-hash 2021-11-06 18:56:41 +00:00
parent 4d7a357898
commit f99b18db87
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,10 @@ fn main() {
let mut previous_command = None;
while let Some(command) = commands.next() {
if command.is_empty() {
continue;
}
// everything after the first whitespace character is interpreted as args to the command
let mut parts = command.trim().split_whitespace();
let command = parts.next().unwrap();