Repository: dathere/qsv (language: rust)

Issue:
-q vs -Q
I noted where usually liked `excel` uses `-Q` `to` uses `-q`.

Should that not perhaps be streamlined over all sub-commands?

And I personally prefer the lower case.


Discussion / hints:
I agree that widely used CLI apps like `tar`, `gzip` & `ripgrep` use the lowercase `-q` shortcut for their `--quiet` option, and perhaps, qsv should align itself with this de facto convention.

However, there's a shortcut collision with other command options: 
- `search` & `searchset` with `-q, --quick`
- `sniff` with `-q, --quote <arg>`

As they're the minority, I'll just flip them to use the uppercase `-Q` shortcut.

Fix patch:
diff --git a/src/cmd/dedup.rs b/src/cmd/dedup.rs
index 24935307f..fda702adc 100644
--- a/src/cmd/dedup.rs
+++ b/src/cmd/dedup.rs
@@ -46,7 +46,7 @@ Common options:
                                appear as the header row in the output.
     -d, --delimiter <arg>      The field delimiter for reading CSV data.
                                Must be a single character. (default: ,)
-    -Q, --quiet                Do not print duplicate count to stderr.
+    -q, --quiet                Do not print duplicate count to stderr.
     --memcheck                 Check if there is enough memory to load the entire
                                CSV into memory using CONSERVATIVE heuristics.
 "#;
diff --git a/src/cmd/describegpt.rs b/src/cmd/describegpt.rs
index efa7e057a..e59afcbe2 100644
--- a/src/cmd/describegpt.rs
+++ b/src/cmd/describegpt.rs
@@ -51,7 +51,7 @@ describegpt options:
 Common options:
     -h, --help             Display this message
     -o, --output <file>    Write output to <file> instead of stdout.
-    -Q, --quiet            Do not print status messages to stderr.
+    -q, --quiet            Do not print status messages to stderr.
 "#;
 
 use std::{env, fs, io::Write, path::PathBuf, process::Command, time::Duration};
diff --git a/src/cmd/excel.rs b/src/cmd/excel.rs
index fe4748583..278fb365a 100644
--- a/src/cmd/excel.rs
+++ b/src/cmd/excel.rs
@@ -155,7 +155,7 @@ Common options:
     -o, --output <file>        Write output to <file> instead of stdout.
     -d, --delimiter <arg>      The delimiter to use when writing CSV data.
                                Must be a single character. [default: ,]
-    -Q, --quiet                Do not display export summary message.
+    -q, --quiet                Do not display export summary message.
 "#;
 
 use std::{cmp, fmt::Write, io::Read, path::PathBuf};
diff --git a/src/cmd/extdedup.rs b/src/cmd/extdedup.rs
index 3eedd04c8..3305ac39e 100644
--- a/src/cmd/extdedup.rs
+++ b/src/cmd/extdedup.rs
@@ -50,7 +50,7 @@ Common options:
                                Must be a single character. (default: ,)
 
     -h, --help                 Display this message
-    -Q, --quiet                Do not print duplicate count to stderr.
+    -q, --quiet                Do not print duplicate count to stderr.
 "#;
 
 use std::{
diff --git a/src/cmd/fixlengths.rs b/src/cmd/fixlengths.rs
index aa7c5ee6a..a3b7e69d0 100644
--- a/src/cmd/fixlengths.rs
+++ b/src/cmd/fixlengths.rs
@@ -34,7 +34,7 @@ Common options:
     -o, --output <file>    Write output to <file> instead of stdout.
     -d, --delimiter <arg>  The field delimiter for reading CSV data.
                            Must be a single character. (default: ,)
-    -Q, --quiet            Don't print removed column information.
+    -q, --quiet            Don't print removed column information.
 "#;
 
 use std::cmp;
diff --git a/src/cmd/joinp.rs b/src/cmd/joinp.rs
index 03dbc7d8b..546de6e72 100644
--- a/src/cmd/joinp.rs
+++ b/src/cmd/joinp.rs
@@ -242,7 +242,7 @@ Common options:
     -o, --output <file>    Write output to <file> instead of stdout.
     -d, --delimiter <arg>  The field delimiter for reading/writing CSV data.
                            Must be a single character. (default: ,)
-    -Q, --quiet            Do not return join shape to stderr.
+    -q, --quiet            Do not return join shape to stderr.
 "#;
 
 use std::{
diff --git a/src/cmd/pivotp.rs b/src/cmd/pivotp.rs
index f25e9af29..3c303e2e4 100644
--- a/src/cmd/pivotp.rs
+++ b/src/cmd/pivotp.rs
@@ -59,7 +59,7 @@ Common options:
     -o, --output <file>     Write output to <file> instead of stdout.
     -d, --delimiter <arg>   The field delimiter for reading/writing CSV data.
                             Must be a single character. (default: ,)
-    -Q, --quiet             Do not return smart aggregation chosen nor pivot result shape to stderr.
+    -q, --quiet             Do not return smart aggregation chosen nor pivot result shape to stderr.
 "#;
 
 use std::{fs::File, io, io::Write, path::Path, sync::OnceLock};
diff --git a/src/cmd/prompt.rs b/src/cmd/prompt.rs
index 510084673..930c81640 100644
--- a/src/cmd/prompt.rs
+++ b/src/cmd/prompt.rs
@@ -44,7 +44,7 @@ Common options:
     -h, --help             Display this message
     -o, --output <file>    Write output to <file> without showing a save dialog.
                            Mutually exclusive with --fd-output.
-    -Q, --quiet            Do not print --fd-output message to stderr.
+    -q, --quiet            Do not print --fd-output message to stderr.
 
 "#;
 
diff --git a/src/cmd/replace.rs b/src/cmd/replace.rs
index 4d6f33e82..37ad87c61 100644
--- a/src/cmd/replace.rs
+++ b/src/cmd/replace.rs
@@ -53,7 +53,7 @@ Common options:
     -d, --delimiter <arg>  The field delimiter for reading CSV data.
                            Must be a single character. (default: ,)
     -p, --progressbar      Show progress bars. Not valid for stdin.
-    -Q, --quiet            Do not print number of replacements to stderr.
+    -q, --quiet            Do not print number of replacements to stderr.
 
 "#;
 
diff --git a/src/cmd/search.rs b/src/cmd/search.rs
index 2502d9531..abc8f46e8 100644
--- a/src/cmd/search.rs
+++ b/src/cmd/search.rs
@@ -43,7 +43,7 @@ search options:
                            of the matched rows and 0 for the non-matched rows.
                            If column is named M, only the M column will be written
                            to the output, and only matched rows are returned.
-    -q, --quick            Return on first match with an exitcode of 0, returning
+    -Q, --quick            Return on first match with an exitcode of 0, returning
                            the row number of the first match to stderr.
                            Return exit code 1 if no match is found.
                            No output is produced.
@@ -77,7 +77,7 @@ Common options:
     -d, --delimiter <arg>  The field delimiter for reading CSV data.
                            Must be a single character. (default: ,)
     -p, --progressbar      Show progress bars. Not valid for stdin.
-    -Q, --quiet            Do not return number of matches to stderr.
+    -q, --quiet            Do not return number of matches to stderr.
 "#;
 
 #[cfg(any(feature = "feature_capable", feature = "lite"))]
diff --git a/src/cmd/searchset.rs b/src/cmd/searchset.rs
index 3f81fed62..0adb3cde0 100644
--- a/src/cmd/searchset.rs
+++ b/src/cmd/searchset.rs
@@ -55,7 +55,7 @@ searchset options:
     --unmatched-output <file>  When --flag-matches-only is enabled, output the rows
                                that did not match to <file>.
 
-    -q, --quick                Return on first match with an exitcode of 0, returning
+    -Q, --quick                Return on first match with an exitcode of 0, returning
                                the row number of the first match to stderr.
                                Return exit code 1 if no match is found.
                                No output is produced. Ignored if --json is enabled.
@@ -83,7 +83,7 @@ Common options:
     -d, --delimiter <arg>      The field delimiter for reading CSV data.
                                Must be a single character. (default: ,)
     -p, --progressbar          Show progress bars. Not valid for stdin.
-    -Q, --quiet                Do not return number of matches to stderr.
+    -q, --quiet                Do not return number of matches to stderr.
 "#;
 
 use std::{
diff --git a/src/cmd/snappy.rs b/src/cmd/snappy.rs
index e5ac7418c..8b25a0580 100644
--- a/src/cmd/snappy.rs
+++ b/src/cmd/snappy.rs
@@ -49,7 +49,7 @@ Common options:
     -o, --output <file>   Write output to <output> instead of stdout.
     -j, --jobs <arg>      The number of jobs to run in parallel when compressing.
                           When not set, its set to the number of CPUs - 1
-    -Q, --quiet           Suppress status messages to stderr.
+    -q, --quiet           Suppress status messages to stderr.
     -p, --progressbar     Show download progress bars. Only valid for URL input.
 "#;
 
diff --git a/src/cmd/sniff.rs b/src/cmd/sniff.rs
index ebb21399b..06beff584 100644
--- a/src/cmd/sniff.rs
+++ b/src/cmd/sniff.rs
@@ -65,7 +65,7 @@ sniff options:
                              Specify this when the delimiter is known beforehand,
                              as the delimiter inferencing algorithm can sometimes fail.
                              Must be a single ascii character.
-    -q, --quote <arg>        The quote character for reading CSV data.
+    --quote <arg>        The quote character for reading CSV data.
                              Specify this when the quote character is known beforehand,
                              as the quote char inferencing algorithm can sometimes fail.
                              Must be a single ascii character - typically, double quote ("),
@@ -88,7 +88,7 @@ sniff options:
                              in this mode.
     --just-mime              Only return the file's mime type. Use this to use sniff as a general
                              mime type detector. Synonym for --no-infer.
-    --quick                  When sniffing a non-CSV remote file, only download the first chunk of the file
+    -Q, --quick              When sniffing a non-CSV remote file, only download the first chunk of the file
                              before attempting to detect the mime type. This is faster but less accurate as
                              some mime types cannot be detected with just the first downloaded chunk.
     --harvest-mode           This is a convenience flag when using sniff in CKAN harvesters. 
diff --git a/src/cmd/split.rs b/src/cmd/split.rs
index 3c800c7d3..00c88937e 100644
--- a/src/cmd/split.rs
+++ b/src/cmd/split.rs
@@ -97,7 +97,7 @@ Common options:
                            appear in all chunks as the header row.
     -d, --delimiter <arg>  The field delimiter for reading CSV data.
                            Must be a single character. (default: ,)
-    -Q, --quiet            Do not display an output summary to stderr.
+    -q, --quiet            Do not display an output summary to stderr.
 "#;
 
 use std::{fs, io, path::Path};
diff --git a/src/cmd/sqlp.rs b/src/cmd/sqlp.rs
index 269883f1c..de9b75a3d 100644
--- a/src/cmd/sqlp.rs
+++ b/src/cmd/sqlp.rs
@@ -265,7 +265,7 @@ Common options:
     -o, --output <file>    Write output to <file> instead of stdout.
     -d, --delimiter <arg>  The field delimiter for reading and writing CSV data.
                            Must be a single character. [default: ,]
-    -Q, --quiet            Do not return result shape to stderr.
+    -q, --quiet            Do not return result shape to stderr.
 "#;
 
 use std::{
diff --git a/src/cmd/tojsonl.rs b/src/cmd/tojsonl.rs
index 056fdd87d..51b45aa91 100644
--- a/src/cmd/tojsonl.rs
+++ b/src/cmd/tojsonl.rs
@@ -41,7 +41,7 @@ Common options:
     -o, --output <file>    Write output to <file> instead of stdout.
     --memcheck             Check if there is enough memory to load the entire
                            CSV into memory using CONSERVATIVE heuristics.
-    -Q, --quiet            Do not display enum/const list inferencing messages.
+    -q, --quiet            Do not display enum/const list inferencing messages.
 "#;
 
 use std::{fmt::Write, path::PathBuf, str::FromStr};
diff --git a/src/cmd/validate.rs b/src/cmd/validate.rs
index 060761ceb..889a3165e 100644
--- a/src/cmd/validate.rs
+++ b/src/cmd/validate.rs
@@ -183,7 +183,7 @@ Common options:
     -d, --delimiter <arg>      The field delimiter for reading CSV data.
                                Must be a single character.
     -p, --progressbar          Show progress bars. Not valid for stdin.
-    -Q, --quiet                Do not display validation summary message.
+    -q, --quiet                Do not display validation summary message.
 "#;
 
 use std::{


Test patch: