summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-10-05 16:32:18 +0200
committerYorhel <git@yorhel.nl>2021-10-05 16:32:36 +0200
commitd005e7c685389cf530ddc6074cbc4965dc13860d (patch)
tree4a2880ac883a4a9b4cde348dde20c73a7df8d81a
parentb3c6f0f48a3459c04fe76bff511d3c2f1abe00ae (diff)
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.
-rw-r--r--ncdu.pod6
-rw-r--r--src/browser.zig3
2 files changed, 7 insertions, 2 deletions
diff --git a/ncdu.pod b/ncdu.pod
index 2938ab4..a8d7a87 100644
--- a/ncdu.pod
+++ b/ncdu.pod
@@ -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.
diff --git a/src/browser.zig b/src/browser.zig
index 5203c46..a96e618 100644
--- a/src/browser.zig
+++ b/src/browser.zig
@@ -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,