Feature: Add flag for screen readers

Screen reader mode will,
Reverse direction
Not shows symbols (directory hierarchy or percentage bars)
Adds a column 'depth' to show depth of directory
This commit is contained in:
andy.boot
2023-01-08 11:51:20 +00:00
parent 1e87a0661b
commit 184d1ec5e8
11 changed files with 105 additions and 23 deletions
+4
View File
@@ -16,6 +16,7 @@ pub struct Config {
pub no_colors: Option<bool>,
pub no_bars: Option<bool>,
pub skip_total: Option<bool>,
pub screen_reader: Option<bool>,
pub ignore_hidden: Option<bool>,
pub iso: Option<bool>,
pub min_size: Option<String>,
@@ -55,6 +56,9 @@ impl Config {
pub fn get_skip_total(&self, options: &ArgMatches) -> bool {
Some(true) == self.skip_total || options.is_present("skip_total")
}
pub fn get_screen_reader(&self, options: &ArgMatches) -> bool {
Some(true) == self.screen_reader || options.is_present("screen_reader")
}
pub fn get_min_size(&self, options: &ArgMatches, iso: bool) -> Option<usize> {
let size_from_param = options.value_of("min_size");
self._get_min_size(size_from_param, iso)