summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2020-06-26 08:35:18 +0200
committerCanop <cano.petrole@gmail.com>2020-06-26 08:35:18 +0200
commit1ab38d3bf03fb32770963868264610abbdafab2b (patch)
tree1a87525111a79db286fc229bf0584f141421a7bb
parent1f05df8cd295f00026f96c3003829611041ff305 (diff)
update documentation for new sort modes
-rw-r--r--README.md12
-rw-r--r--src/conf/default_conf.rs1
-rw-r--r--src/display/displayable_tree.rs2
-rw-r--r--website/docs/conf_file.md7
-rw-r--r--website/docs/index.md12
-rw-r--r--website/docs/skins.md1
6 files changed, 25 insertions, 10 deletions
diff --git a/README.md b/README.md
index e78970c..7239fc4 100644
--- a/README.md
+++ b/README.md
@@ -126,15 +126,19 @@ If you want to display *dates* and *permissions*, do `br -dp` which gets you thi
You may also toggle options with a few keystrokes while inside broot. For example hitting a space, a `d` then enter shows you the dates. Or a space, then `h` then enter and you see hidden files.
-### See what takes space:
+### Sort, see what takes space:
-![size](img/20191112-sizes.png)
+You can toggle sorts from inside broot, or start broot with `--sort-by-size` or `--sort-by-date`.
+
+When sorting, the whole content of directories is taken into account. So if you want to find on monday morning the most recently modified files, just launch `br --sort-by-date ~`.
-If you start broot with the `--sizes` option, or if you type `:s` while in broot, you get a mode tailored to "whale spotting" navigation, making it easy to determine what files or folders take space.
+If you start broot with the `--whale-spotting` option (or its shorcut `-w`), you get a mode tailored to "whale spotting" navigation, making it easy to determine what files or folders take space.
+
+![size](img/20191112-sizes.png)
And you keep all broot tools, like filtering or the ability to delete or open files and directories.
-Sizes are computed in the background, you don't have to wait for them when you navigate.
+Sizes, dates, files counts, are computed in the background, you don't have to wait for them when you navigate.
### check git statuses:
diff --git a/src/conf/default_conf.rs b/src/conf/default_conf.rs
index 27cc312..e24eff5 100644
--- a/src/conf/default_conf.rs
+++ b/src/conf/default_conf.rs
@@ -155,6 +155,7 @@ leave_broot = false
# perm_x = "ansi(65) None"
# owner = "ansi(138) None"
# group = "ansi(131) None"
+# count = "ansi(136) gray(3)"
# dates = "ansi(66) None"
# sparse = "ansi(214) None"
# content_extract = "ansi(29) None"
diff --git a/src/display/displayable_tree.rs b/src/display/displayable_tree.rs
index c8bf575..99ae99d 100644
--- a/src/display/displayable_tree.rs
+++ b/src/display/displayable_tree.rs
@@ -450,7 +450,7 @@ impl<'s, 't> DisplayableTree<'s, 't> {
let length =
9 + 1 + user_group_max_lengths.0 + 1 + user_group_max_lengths.1 + 1;
for _ in 0..length {
- cw.queue_char(&self.skin.tree, ' ')?;
+ cw.queue_char(&self.skin.tree, '─')?;
}
}
}
diff --git a/website/docs/conf_file.md b/website/docs/conf_file.md
index c6e52e3..cbb6cf4 100644
--- a/website/docs/conf_file.md
+++ b/website/docs/conf_file.md
@@ -287,7 +287,11 @@ invocation | default key | default shortcut | behavior / details
:rm | - | - | remove the selected file or directory. To stay safe, don't define a keyboard key for this action
:select_first | - | - | select the first line
:select_last | - | - | select the last line
-:toggle_dates | - | - | toggle display of last modified dates
+:sort_by_count | - | - | sort by count (only one level of the tree is displayed)
+:sort_by_date | - | - | sort by date
+:sort_by_size | - | - | sort by size
+:toggle_counts | - | - | toggle display of total counts of files per directory
+:toggle_dates | - | - | toggle display of last modified dates (looking for the most recently changed file, even deep)
:toggle_files | - | - | toggle showing files (or just folders)
:toggle_git_ignore | - | - | toggle git hignore handling (auto, no or yes)
:toggle_git_file_info | - | - | toggle display of git file information
@@ -296,6 +300,7 @@ invocation | default key | default shortcut | behavior / details
:toggle_perm | - | - | toggle display of permissions (not available on Windows)
:toggle_sizes | - | - | toggle the size mode
:toggle_trim_root | - | - | toggle trimming of top level files in tree display
+:up_tree | - | - | focus the parent of the current root
Note that
diff --git a/website/docs/index.md b/website/docs/index.md
index b61db43..f3a18b9 100644
--- a/website/docs/index.md
+++ b/website/docs/index.md
@@ -94,15 +94,19 @@ If you want to display *dates* and *permissions*, do `br -dp` which gets you thi
You may also toggle options with a few keystrokes while inside broot. For example hitting a space, a `d` then enter shows you the dates. Or a space, then `h` then enter and you see hidden files.
-# See what takes space:
+# Sort, see what takes space:
-![size](img/20191112-sizes.png)
+You may sort by launching broot with `--sort-by-size` or `--sort-by-date`. Or you may, inside broot, just type a space, then `sd`, and <kbd>enter</kbd> and you toggled the `:sort_by_date` mode.
+
+When sorting, the whole content of directories is taken into account. So if you want to find on monday morning the most recently modified files, just launch `br --sort-by-date ~`.
-If you start broot with the `--sizes` option, or if you type `:s` while in broot, you get a mode tailored to "whale spotting" navigation, making it easy to determine what files or folders take space.
+If you start broot with the `--whale-spotting` option (or its shorcut `-w`), you get a mode tailored to "whale spotting" navigation, making it easy to determine what files or folders take space.
+
+![size](img/20191112-sizes.png)
And you keep all broot tools, like filtering or the ability to delete or open files and directories.
-Sizes are computed in the background, you don't have to wait for them when you navigate.
+Sizes, dates, files counts, are computed in the background, you don't have to wait for them when you navigate.
# check git statuses:
diff --git a/website/docs/skins.md b/website/docs/skins.md
index a075290..4d33567 100644
--- a/website/docs/skins.md
+++ b/website/docs/skins.md
@@ -20,6 +20,7 @@ perm_w = "ansi(132) None"
perm_x = "ansi(65) None"
owner = "ansi(138) None"
group = "ansi(131) None"
+count = "ansi(136) gray(3)"
dates = "ansi(66) None"
sparse = "ansi(214) None"
content_extract = "ansi(29) None"