fix: empty commands

This commit is contained in:
iff
2025-04-09 17:24:19 +02:00
parent b5c19f9a36
commit e5da2e3e6a
2 changed files with 17 additions and 0 deletions

View File

@@ -118,6 +118,19 @@ ja = "シェルが指定されていません。シェルを指定してくだ
ko = "쉘이 지정되지 않았습니다. 쉘을 지정하십시오."
zh = "未指定 shell。请指定一个 shell。"
[empty-command]
en = "Last command was empty"
es = "El último comando estaba vacío"
de = "Der letzte Befehl war leer"
fr = "La dernière commande était vide"
it = "L'ultimo comando era vuoto"
pt = "O último comando estava vazio"
ru = "Последняя команда была пустой"
ja = ""
ko = " "
zh = ""
[multi-suggest]
en = "%{num} suggestion(s) found"
es = "%{num} sugerencia(s) encontrada(s)"

View File

@@ -224,6 +224,10 @@ impl Data {
}
#[cfg(debug_assertions)]
eprintln!("split: {:?}", split);
if split.is_empty() {
eprintln!("{}", t!("empty-command"));
exit(1);
}
self.split = split;
}