Repository: dathere/qsv (language: rust)

Issue:
QSV_AUTOINDEX_SIZE
In the documentation and help the variable still shows as QSV_AUTOINDEX instead of QSV_AUTOINDEX_SIZE


Discussion / hints:

Fix patch:
diff --git a/src/cmd/index.rs b/src/cmd/index.rs
index 2440cb166..52a82dcf6 100644
--- a/src/cmd/index.rs
+++ b/src/cmd/index.rs
@@ -8,9 +8,9 @@ automatically used by commands that can benefit from it. If the original CSV
 data changes after the index is made, commands that try to use it will result
 in an error (you have to regenerate the index before it can be used again).
 
-However, if the environment variable QSV_AUTOINDEX is set, qsv will automatically
-create an index when none is detected, and stale indices will be automatically
-updated as well.
+However, if the environment variable QSV_AUTOINDEX_SIZE is set, qsv will
+automatically create an index when the input file size >= specified size (bytes).
+It will also automatically update stale indices as well.
 
 Usage:
     qsv index [options] <input>
diff --git a/src/config.rs b/src/config.rs
index b141830b1..dc9c2a416 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -599,7 +599,7 @@ impl Config {
     /// Check if the index file exists and is newer than the CSV file.
     /// If so, return the index file.
     /// If not, return None.
-    /// Unless QSV_AUTOINDEX is set, in which case, we'll recreate the
+    /// Unless QSV_AUTOINDEX_SIZE is set, in which case, we'll recreate the
     /// stale index automatically
     #[inline]
     pub fn indexed(&self) -> CliResult<Option<Indexed<fs::File, fs::File>>> {


Test patch: