From 048c97adcedab552e8c5b33567a06de4cb5c0f81 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 18 Dec 2018 00:39:24 +0100 Subject: Port argument handling to argparse This patch replaces the macro for argument parsing with `argparse::ArgumentParser` from the argparse crate. It moves the application logic to the `commands` module and the argument parsing to the `options` module. An enum is used to represent the available commands. The code is based on the `subcommands.rs` example shipped with argparse. --- nitrocli/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nitrocli/CHANGELOG.md') diff --git a/nitrocli/CHANGELOG.md b/nitrocli/CHANGELOG.md index 1beabf2..2d43788 100644 --- a/nitrocli/CHANGELOG.md +++ b/nitrocli/CHANGELOG.md @@ -12,7 +12,8 @@ Unreleased version of the crate, and minimum version of `rustc` required - Fixed wrong messages in the pinentry dialog that were caused by unescaped spaces in a string -- Added `argparse` dependency in version `0.2.2` +- Use the `argparse` crate to parse the command-line arguments + - Added `argparse` dependency in version `0.2.2` 0.1.3 -- cgit v1.2.1