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:") {
|
||||
match opt.opt() {
|
||||
Ok(_) => {
|
||||
Ok("d") => {
|
||||
/* delimiter */
|
||||
d = opt.arg().unwrap();
|
||||
optind = opt.ind();
|
||||
},
|
||||
Err(_) => {
|
||||
_ => {
|
||||
eprintln!("{}", usage);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user