From 900d31f6fd733227be88f1480c0c78f84f2ed9bb Mon Sep 17 00:00:00 2001 From: Yorhel Date: Tue, 5 Oct 2021 17:16:59 +0200 Subject: [PATCH] Add CLI options for all UI settings + reorder manpage a bit, since the scan options tend to be more relevant than all those UI options. Again, these are mainly useful with a config file. --- ncdu.pod | 147 +++++++++++++++++++++++++++++++----------------- src/browser.zig | 28 +++++---- src/main.zig | 23 +++++++- 3 files changed, 130 insertions(+), 68 deletions(-) diff --git a/ncdu.pod b/ncdu.pod index a8d7a87..2b0a343 100644 --- a/ncdu.pod +++ b/ncdu.pod @@ -75,6 +75,58 @@ using 'm' and 'M', respectively. =back +=head2 Scan Options + +These options affect the scanning progress, and have no effect when importing +directory information from a file. + +=over + +=item -x, --one-file-system + +Do not cross filesystem boundaries, i.e. only count files and directories on +the same filesystem as the directory being scanned. + +=item --cross-file-system + +Do cross filesystem boundaries. This is the default, but can be specified to +overrule a previously given C<-x>. + +=item --exclude I + +Exclude files that match I. The files will still be displayed by +default, but are not counted towards the disk usage statistics. This argument +can be added multiple times to add more patterns. + +=item -X I, --exclude-from I + +Exclude files that match any pattern in I. Patterns should be separated +by a newline. + +=item --include-caches, --exclude-caches + +Include (default) or exclude directories containing CACHEDIR.TAG. The +directories will still be displayed, but their contents will not be scanned or +counted towards the disk usage statistics. +L + +=item -L, --follow-symlinks, --no-follow-symlinks + +Follow (or not) symlinks and count the size of the file they point to. As of +ncdu 1.14, this option will not follow symlinks to directories and will count +each symlinked file as a unique file (i.e. unlike how hard links are handled). +This is subject to change in later versions. + +=item --include-kernfs, --exclude-kernfs + +(Linux only) Include (default) or exclude Linux pseudo filesystems, e.g. /proc +(procfs), /sys (sysfs). + +The complete list of currently known pseudo filesystems is: binfmt, bpf, cgroup, +cgroup2, debug, devpts, proc, pstore, security, selinux, sys, trace. + +=back + =head2 Interface options =over @@ -140,11 +192,54 @@ List sizes using base 10 prefixes, that is, powers of 1000 (KB, MB, etc), as defined in the International System of Units (SI), instead of the usual base 2 prefixes, that is, powers of 1024 (KiB, MiB, etc). +=item --disk-usage, --apparent-size + +Select whether to display disk usage (default) or apparent sizes. Can also be +toggled in the browser with the 'a' key. + +=item --show-hidden, --hide-hidden + +Show (default) or hide "hidden" and excluded files. Can also be toggled in the +browser with the 'e' key. + +=item --show-itemcount, --hide-itemcount + +Show or hide (default) the item counts column. Can also be toggled in the +browser with the 'c' key. + +=item --show-mtime, --hide-mtime + +Show or hide (default) the last modification time column. Can also be toggled +in the browser with the 'm' key. This option is ignored when not in extended +mode (see C<-e>). + +=item --show-graph, --hide-graph + +Show (default) or hide the relative size bar column. Can also be toggled in the +browser with the 'g' key. + +=item --show-percent, --hide-percent + +Show (default) or hide the relative size percent column. Can also be toggled in +the browser with the 'g' key. + +=item --shared-column I