Skip to content

Commit

Permalink
add value hints
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlgorythm committed Dec 3, 2023
1 parent 80ce422 commit 8323f3c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pin-gen/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
use crate::{Error, Result};
use clap::Parser;
use clap::{Parser, ValueHint};
use error_stack::ResultExt;
use std::path::PathBuf;

#[derive(Parser, Debug, Clone)]
#[clap(author, version, about)]
pub struct CliArgs {
#[clap(short = 'f', long, default_value = "/etc/security/pins.toml")]
#[clap(
short = 'f',
long,
default_value = "/etc/security/pins.toml",
value_hint(ValueHint::FilePath)
)]
pub database_filepath: PathBuf,
#[clap(env = "SUDO_USER")]
#[clap(env = "SUDO_USER", value_hint(ValueHint::Username))]
pub username: Option<String>,
/// Use this flag to try different parameters.
/// It disables the need for a username and pin.
Expand Down

0 comments on commit 8323f3c

Please sign in to comment.