fixed usage information

This commit is contained in:
Emma Tebibyte 2023-03-24 19:42:34 -04:00
parent 088824efdf
commit 7fc82adc1c
Signed by: emma
GPG Key ID: 6D661C738815E7DD
1 changed files with 3 additions and 2 deletions

View File

@ -107,16 +107,17 @@ fn parse_toml(
fn main() {
let argv: Vec<String> = env::args().collect();
let usage_info = format!("Usage: {} [table.]key[[index]] [file...]", argv[0]);
if argv.len() <= 1 {
eprintln!("Usage: {} [table...].[value[index]] [file...]", argv[0]);
eprintln!(, argv[0]);
exit(64); // sysexits(3) EX_USAGE
}
let input = match argv.get(2) {
Some(val) => val,
None => {
eprintln!("Usage: {} [table...].[value[index]] [file...]", argv[0]);
eprintln!("{}", usage_info);
exit(EX_USAGE);
},
};