Repository: sharkdp/fd (language: rust)

Issue:
Consider adding a `--mindepth` alias for `--min-depth`
As of https://github.com/sharkdp/fd/pull/323, `fd` supports a `--maxdepth` alias. However, no such alias exists for `--min-depth` so the following, seemingly correct command fails:

```shell
$ fd --maxdepth=3 --mindepth=2
error: unexpected argument '--mindepth' found

  tip: a similar argument exists: '--min-depth'

Usage: fd --max-depth <depth> --min-depth <depth> [pattern] [path]...

For more information, try '--help'.
```


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 26c43bf66..e891da1f7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,19 @@
+# Upcoming release
+
+## Features
+
+- Add a hidden `--mindepth` alias for `--min-depth`. (#1617)
+
+
+## Bugfixes
+
+
+## Changes
+
+
+## Other
+
+
 # 10.2.0
 
 ## Features
diff --git a/src/cli.rs b/src/cli.rs
index 9bdbcc7d4..b45ef12dc 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -275,6 +275,7 @@ pub struct Opts {
         long,
         value_name = "depth",
         hide_short_help = true,
+        alias("mindepth"),
         help = "Only show search results starting at the given depth.",
         long_help
     )]


Test patch:
diff --git a/tests/tests.rs b/tests/tests.rs
index 3d11cdcda..c6ffe694a 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -2527,6 +2527,7 @@ fn test_number_parsing_errors() {
     te.assert_failure(&["--threads=0"]);
 
     te.assert_failure(&["--min-depth=a"]);
+    te.assert_failure(&["--mindepth=a"]);
     te.assert_failure(&["--max-depth=a"]);
     te.assert_failure(&["--maxdepth=a"]);
     te.assert_failure(&["--exact-depth=a"]);