From f303c435736da898eb175f95f3f4ce3e9fb539b2 Mon Sep 17 00:00:00 2001 From: Tamas Levai Date: Mon, 4 Jan 2021 22:34:40 +0100 Subject: Add option to list directories first --- src/args.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/args.rs') diff --git a/src/args.rs b/src/args.rs index dc160d0..4c0878e 100644 --- a/src/args.rs +++ b/src/args.rs @@ -110,6 +110,10 @@ struct CLIArgs { #[structopt(short = "z", long = "enable-zip")] enable_zip: bool, + /// List directories first + #[structopt(short = "D", long = "dirs-first")] + dirs_first: bool, + /// Shown instead of host in page title and heading #[structopt(short = "t", long = "title")] title: Option, @@ -219,6 +223,7 @@ pub fn parse_args() -> crate::MiniserveConfig { file_upload: args.file_upload, tar_enabled: args.enable_tar, zip_enabled: args.enable_zip, + dirs_first: args.dirs_first, title: args.title, } } -- cgit v1.2.3