use std::path::PathBuf;
use clap::Parser;
#[derive(Debug, Parser)]
#[clap(
name = "sha1cdsum",
about = "Print or check SHA1 (160-bit) checksums with \
collision detection.",
after_help = "\
The last five options are useful only when verifying checksums.
The sums are computed using Marc Stevens' modified SHA1 that detects
collision attacks. When checking, the input should be a former output
of this program. The default mode is to print a line with checksum, a
space, a character indicating input mode ('*' for binary, ' ' for text
or where binary is insignificant), and name for each FILE.
If a collision is detected, '*coll*' is printed in front of the file
name.
Note: There is no difference between binary mode and text mode on GNU
systems.
This program implements the same interface as coreutils' sha1sum,
modulo error messages printed to stderr, handling of non-UTF8
filenames, and bugs.")
]
pub struct Opt {
#[clap(short, long, conflicts_with("text"))]
pub binary: bool,
#[clap(short, long, conflicts_with("tag"))]
pub check: bool,
#[clap(long, conflicts_with("check"), conflicts_with("text"))]
pub tag: bool,
#[clap(short, long, conflicts_with("binary"), conflicts_with("tag"))]
pub text: bool,
#[clap(short, long, conflicts_with("check"))]
pub zero: bool,
#[clap(long, display_order = 1000)]
pub ignore_missing: bool,
#[clap(long, display_order = 1000)]
pub quiet: bool,
#[clap(long, display_order = 1000)]
pub status: bool,
#[clap(long, display_order = 1000)]
pub strict: bool,
#[clap(short, long, display_order = 1000)]
pub warn: bool,
pub files: Vec<PathBuf>,
}