From: Ian Jackson Date: Fri, 7 Aug 2020 23:38:51 +0000 (+0100) Subject: wip opts X-Git-Tag: otter-0.2.0~1170 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=614b97e82c2807a1f2bf9b0cf4b75ee257af8fe5;p=otter.git wip opts --- diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 13e9ec85..04a8b33f 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -112,6 +112,9 @@ fn main() { user: user.into() }))), "use specified unix user scope"); + scope.add_option(&["--scope-unix"], + StoreConst(None), + "use USER scope"); let r = ap.parse_args(); mem::drop(ap); r @@ -120,6 +123,6 @@ fn main() { Cell::from_mut(&mut mainopts.scope); let opts = MainOpts::from_args(); */ - }.expect("parse argw"); + }.unwrap_or_else(|_already_printed| std::process::exit(12)); println!("{:?}", &mainopts); }