cli: rename 'list' command to 'readers'; improve usage
There are going to be several `list` commands (e.g. `yubikey keys list`) so this is a confusing name. If we need more than one `readers` subcommand we can change this to be `readers list` eventually. Separately (in what probably should've been its own commit, mea culpa) this adds slightly better usage.
This commit is contained in:
@@ -4,12 +4,12 @@ use gumdrop::Options;
|
||||
use std::process::exit;
|
||||
use yubikey_piv::readers::Readers;
|
||||
|
||||
/// The `list` subcommand
|
||||
/// The `readers` subcommand
|
||||
#[derive(Debug, Options)]
|
||||
pub struct ListCmd {}
|
||||
pub struct ReadersCmd {}
|
||||
|
||||
impl ListCmd {
|
||||
/// Run the `list` subcommand
|
||||
impl ReadersCmd {
|
||||
/// Run the `readers` subcommand
|
||||
pub fn run(&self) {
|
||||
let mut readers = Readers::open().unwrap_or_else(|e| {
|
||||
status_err!("couldn't open PC/SC context: {}", e);
|
||||
Reference in New Issue
Block a user