diff options
author | elandsborough <elliott.landsborough@gmail.com> | 2024-01-10 19:53:36 +0000 |
---|---|---|
committer | ElliottLandsborough <elliott.landsborough@gmail.com> | 2024-01-13 03:28:24 +0000 |
commit | e5e3ad2fed80bea3f2c9c90f87a405bca077691e (patch) | |
tree | 80c37e10ad52880d35efb55fbead0f17afa83323 /src/args.rs | |
parent | Skip newline test case on Windows (diff) | |
download | miniserve-e5e3ad2fed80bea3f2c9c90f87a405bca077691e.tar.gz miniserve-e5e3ad2fed80bea3f2c9c90f87a405bca077691e.zip |
Set default sorting order and method with arguments
Diffstat (limited to 'src/args.rs')
-rw-r--r-- | src/args.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs index c5c268f..e400c8a 100644 --- a/src/args.rs +++ b/src/args.rs @@ -113,6 +113,26 @@ pub struct CliArgs { #[arg(short = 'H', long = "hidden", env = "MINISERVE_HIDDEN")] pub hidden: bool, + /// Default sorting method for file list + #[arg( + short = 'S', + long = "default-sorting-method", + default_value = "", + ignore_case = true, + env = "MINISERVE_DEFAULT_SORTING_METHOD" + )] + pub default_sorting_method: String, + + /// Default sorting order for file list + #[arg( + short = 'O', + long = "default-sorting-order", + default_value = "", + ignore_case = true, + env = "MINISERVE_DEFAULT_SORTING_ORDER" + )] + pub default_sorting_order: String, + /// Default color scheme #[arg( short = 'c', |