fixed usage information
This commit is contained in:
parent
088824efdf
commit
7fc82adc1c
@ -107,16 +107,17 @@ fn parse_toml(
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let argv: Vec<String> = env::args().collect();
|
let argv: Vec<String> = env::args().collect();
|
||||||
|
let usage_info = format!("Usage: {} [table.]key[[index]] [file...]", argv[0]);
|
||||||
|
|
||||||
if argv.len() <= 1 {
|
if argv.len() <= 1 {
|
||||||
eprintln!("Usage: {} [table...].[value[index]] [file...]", argv[0]);
|
eprintln!(, argv[0]);
|
||||||
exit(64); // sysexits(3) EX_USAGE
|
exit(64); // sysexits(3) EX_USAGE
|
||||||
}
|
}
|
||||||
|
|
||||||
let input = match argv.get(2) {
|
let input = match argv.get(2) {
|
||||||
Some(val) => val,
|
Some(val) => val,
|
||||||
None => {
|
None => {
|
||||||
eprintln!("Usage: {} [table...].[value[index]] [file...]", argv[0]);
|
eprintln!("{}", usage_info);
|
||||||
exit(EX_USAGE);
|
exit(EX_USAGE);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user