From 7b13251d348e73823e14b93eef1a70a635ef8516 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Mon, 6 Nov 2023 14:00:20 +0100 Subject: [PATCH] Issue #15: Add flag '--fix' to modify sub command --- src/cli.rs | 5 +++++ src/main.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index 5cb4e99..31fe61f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -93,6 +93,11 @@ pub enum SubCommand { help = "Starte interaktiven Dialog zum Modifizieren von OSC-Dateien" )] interactive: bool, + #[arg( + long = "fix", + help = "Erweiterte Problembehandlung und Reparatur der OSC-Datei" + )] + fix: bool, }, #[command(about = "Vergleiche zwei Dateien anhand der Revision der enthaltenen Inhalte")] Diff { diff --git a/src/main.rs b/src/main.rs index 034c12a..14255fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -156,6 +156,7 @@ fn main() -> Result<(), Box> { sorted, strip, interactive, + fix, } => { let data = &mut read_inputfile(inputfile)?; @@ -192,6 +193,10 @@ fn main() -> Result<(), Box> { .unwrap(); } + if fix { + // No operation as of now + } + if sorted { data.sorted(); }