fop(1): better opt matching
This commit is contained in:
parent
68e31058a8
commit
6b9d13b8a0
@ -42,12 +42,12 @@ fn main() {
|
|||||||
|
|
||||||
while let Some(opt) = argv.getopt("d:") {
|
while let Some(opt) = argv.getopt("d:") {
|
||||||
match opt.opt() {
|
match opt.opt() {
|
||||||
Ok(_) => {
|
Ok("d") => {
|
||||||
/* delimiter */
|
/* delimiter */
|
||||||
d = opt.arg().unwrap();
|
d = opt.arg().unwrap();
|
||||||
optind = opt.ind();
|
optind = opt.ind();
|
||||||
},
|
},
|
||||||
Err(_) => {
|
_ => {
|
||||||
eprintln!("{}", usage);
|
eprintln!("{}", usage);
|
||||||
exit(EX_USAGE);
|
exit(EX_USAGE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user