Skip to content

Commit

Permalink
chwd: Require listing options to be specified for detailed output
Browse files Browse the repository at this point in the history
  • Loading branch information
ventureoo committed Aug 21, 2024
1 parent 9e9a212 commit 2407344
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

use clap::builder::ArgPredicate;
use clap::Parser;

#[derive(Parser, Debug)]
Expand All @@ -30,23 +31,23 @@ pub struct Args {
pub remove: Option<String>,

/// Show detailed info for listings
#[arg(short, long)]
#[arg(short, long, requires_if(ArgPredicate::IsPresent, "listings"))]
pub detail: bool,

/// Force reinstall
#[arg(short, long)]
pub force: bool,

/// List installed kernels
#[arg(long)]
#[arg(long, group = "listings")]
pub list_installed: bool,

/// List available profiles for all devices
#[arg(long = "list")]
#[arg(long = "list", group = "listings")]
pub list_available: bool,

/// List all profiles
#[arg(long)]
#[arg(long, group = "listings")]
pub list_all: bool,

/// Autoconfigure
Expand Down

0 comments on commit 2407344

Please sign in to comment.