Document the 'u' key

Might as well keep it. The quick-config menu popup idea can always be
implemented later on, we're not running out of keys quite yet.
This commit is contained in:
Yorhel 2021-10-05 16:32:18 +02:00
parent b3c6f0f48a
commit d005e7c685
2 changed files with 7 additions and 2 deletions

View file

@ -266,6 +266,12 @@ Toggle between showing percentage, graph, both, or none. Percentage is relative
to the size of the current directory, graph is relative to the largest item in
the current directory.
=item u
Toggle display of the shared / unique size column for directories that share
hard links. This column is only visible if the current listing contains
directories with shared hard links.
=item c
Toggle display of child item counts.

View file

@ -567,7 +567,6 @@ const info = struct {
};
const help = struct {
// TODO: Document 'u' key... once I have something final for it.
const keys = [_][:0]const u8{
"up, k", "Move cursor up",
"down, j", "Move cursor down",
@ -580,6 +579,7 @@ const help = struct {
"d", "Delete selected file or directory",
"t", "Toggle dirs before files when sorting",
"g", "Show percentage and/or graph",
"u", "Show/hide hard link shared sizes",
"a", "Toggle between apparent size and disk usage",
"c", "Toggle display of child item counts",
"m", "Toggle display of latest mtime (-e flag)",
@ -926,7 +926,6 @@ pub fn keyInput(ch: i32) void {
.percent => .both,
.both => .off,
},
// TODO: This key binding is not final! I'd rather add a menu selection thing for advanced settings rather than risk running out of more keys.
'u' => main.config.show_shared = switch (main.config.show_shared) {
.off => .shared,
.shared => .unique,