From d005e7c685389cf530ddc6074cbc4965dc13860d Mon Sep 17 00:00:00 2001 From: Yorhel Date: Tue, 5 Oct 2021 16:32:18 +0200 Subject: [PATCH] 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. --- ncdu.pod | 6 ++++++ src/browser.zig | 3 +-- 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,