Skip to content

Commit

Permalink
Tune naming
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Nov 17, 2024
1 parent 535c17e commit 2192dde
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,21 @@ const GIT_VERSION: &str = git_version!(cargo_prefix = "");
after_help = HELP_TEXT_FOOTER,
override_usage = r#"
diff ... | riff [options...]
riff [-b] [-w] [options...] <F1> <F2>
riff [-b] [-w] [options...] <FD1> <FD2>
riff [-b] [-w] [options...] --file <FILE>"#
)]

struct Options {
/// First file or directory to compare
#[arg(requires("f2"))]
f1: Option<String>,
#[arg(requires("fd2"))]
fd1: Option<String>,

/// Second file or directory to compare
#[arg()]
f2: Option<String>,
fd2: Option<String>,

/// Read diff or patch file
#[arg(long, short, conflicts_with_all = ["f1", "f2"])]
#[arg(long, short, conflicts_with_all = ["fd1", "fd2"])]
file: Option<PathBuf>,

/// Ignore changes in amount of whitespace
Expand Down Expand Up @@ -503,7 +503,7 @@ fn main() {
UnchangedStyle::Experimental => Formatter::yellow(),
};

if let (Some(file1), Some(file2)) = (options.f1, options.f2) {
if let (Some(file1), Some(file2)) = (options.fd1, options.fd2) {
// "riff file1 file2"
exec_diff_highlight(
&file1,
Expand Down

0 comments on commit 2192dde

Please sign in to comment.