1
1
Граф коммитов

387 Коммитов

Автор SHA1 Сообщение Дата
Yorhel
c08340ee08 Year + version bump for 1.18.1 2023-02-12 08:44:13 +01:00
Yorhel
daaca0a903 Really fix build failure if exclude-kernfs option is not available
Fixes #218, for real this time.
2023-02-08 14:23:48 +01:00
Yorhel
6993941646 Fix build failure if exclude-kernfs option is not available
Fixes #218
2023-02-08 08:14:44 +01:00
Yorhel
3ef0ac93c7 Version 1.18 2022-12-06 10:46:50 +01:00
Yorhel
6dd159d489 Backport --(enable|disable)-(shell|delete|refresh) from 2.x
Only remaining options missing from this C implementation are
--graph-style (sounds doable, but pretty low priority) and
--shared-column (unlikely to happen).
2022-11-30 11:44:08 +01:00
Yorhel
49e4b061a5 Backport configuration file support from 2.x 2022-11-06 13:37:33 +01:00
Yorhel
b45f8e4c06 Backport a bunch of CLI options from 2.x + sync manpage changes 2022-11-05 16:43:57 +01:00
Yorhel
9670ca66ed Backport argument parser from ncdu 2.x + add a few inverted arguments
This makes way for backporting the various new configuration options
and config file support from 2.x.
2022-11-05 12:21:30 +01:00
Yorhel
dc78e8db19 Properly mark functions without arguments as (void)
Fixes compilation with -Werror=old-style-definition
2022-11-05 10:54:37 +01:00
Yorhel
a5e8a43943 Set default attributes to the whole window during curses init
Based on 058b26bf9a4d32c43b018897cfe8f70a3f2a90d2
2022-06-15 06:26:18 +02:00
Yorhel
683eb26ad1 Year + version bump for 1.17 2022-04-28 11:19:27 +02:00
Yorhel
23e3eba5d2 Remove static build script
I'm not building static binaries for the 1.x branch anymore, the Zig
version replaces those binaries just fine.
2022-04-28 11:11:22 +02:00
François Revol
e29a42a02a Some more compatibility improvements for C89 environments
This compiles now fine with gcc 2.95 on Haiku.
2022-02-08 10:02:10 +01:00
Yorhel
15ebd21195 Some compatibility improvements for older (C89) environments
Whether this actually works on older environments, I don't really know.
2022-02-07 13:28:15 +01:00
Ciprian Tomoiaga
b340c04450 moved natSort files to deps 2021-12-23 09:07:54 +00:00
Ciprian Tomoiaga
8137444062 Use Natural Sort by Name in v1.x 2021-12-22 14:26:42 +00:00
rofl0r
e1a9b30803 dir_scan: call strlen only once 2021-10-27 13:44:01 +00:00
rofl0r
abab9d360d dir_scan: fix wrong assumption that errno can only be changed by readdir()
this breaks ncdu with musl 1.2.2, if the madvise syscall isn't implemented,
in which case realloc sets errno.
if errno is to be used, it needs to be set to 0 and checked after every
single libc call that could modify it.
interestingly, in the condition that the error is set here, ncdu just
prints nothing and silently quits with exit status 0 (success).
(maybe an error is being printed, but before the terminal is put back into
 a normal state.)
2021-10-27 13:40:41 +00:00
Oğuz Ersen
96a9231927
Make options, keys and file flags bold in man page 2021-10-06 20:07:17 +03:00
Yorhel
376aad0d35 Add dark-bg color scheme + enable colors by default if !NO_COLOR
The dark-bg scheme draws an explicit black background, so should also be
readable in terminals with a light background. That's been the main
show-stopper for enabling colors by default, as the 'dark' color scheme
is totally unreadable on light backgrounds and there's no way to detect
what background the terminal is actually using.
2021-08-16 16:07:51 +02:00
Yorhel
f982af81b0 Year + version bump for 1.16 2021-07-02 13:30:55 +02:00
Yorhel
52daeafcd8 Display setuid/setgid and sticky bits in file mode
Same way that coreutils 'ls -l' displays them.
2021-06-11 11:13:14 +02:00
Yorhel
bd01f5773d JSON import: accept fractional mtime values
For sub-second precision, if we ever want to add that.
2021-05-27 10:33:01 +02:00
Yorhel
67a1d84216 Mark apparent size or disk usage label in footer as bold
Depending on what is being displayed. Not *super* happy with this
solution, but it works.

Fixes #110.
2021-05-24 10:42:51 +02:00
Yorhel
ebeee7be01 browser.c: Fix bar width floating point calculation
In some cases the bar width may be 1 block short due to imprecise
floating point calculations. i.e. (max_width * a) / a != max_width,
whereas (max_width * (a/a)) == max_width. Or, at least, that's what I've
observed so far.
2021-05-23 14:26:29 +02:00
Yorhel
a6b4aead43 Add $NCDU_LEVEL environment variable when spawning a shell
Similar to $SHLVL and $RANGER_LEVEL.
2021-05-12 16:30:43 +02:00
Yorhel
e278660464 dir_import: Accept JSON data after the last object
This should really have been accepted from the start. Adding extra
elements to the top-level array might be useful for aux. data related to
the scanned files, e.g. map of seen uid/gids to names, information about
the scanned dev ids, etc. But since ncdu would throw an error on further
array elements, adding such information can't be done without breaking
compat with older versions. :(
2021-05-12 16:04:36 +02:00
Yorhel
ca51d4ed1a JSON Export: only export ino for hlinks and include hlink count
Bumping the minor version of the file format to '2'.

The "ino" field is only interesting for hardlinks, so we can save space
by not exporting it for other entries.

The hlink count will be interesting later on when I implement tracking
of shared data between directories. It's currently ignored on import.
The "nlink" field makes the "hlnkc" field redundant, but let's keep
including that field anyway for backwards compatibility.
2021-05-12 11:28:26 +02:00
Yorhel
9337cdc99e Test for read error while reading the --exclude-from file
Fixes #171
2021-03-04 16:07:48 +01:00
Christian Göttsche
a216bc2d35 Scale size bar with max column size
Use 'max(10, column_size / 7)' instead of a fixed size of 10
2020-07-12 18:30:02 +02:00
Yorhel
1035aed81a Version bump for 1.15.1 2020-06-10 12:24:34 +02:00
Yorhel
a389443c9a Add --exclude-firmlinks and follow firmlinks by default
What a mess.

https://code.blicky.net/yorhel/ncdu/issues/153#issuecomment-764
2020-06-07 10:03:11 +02:00
Christian Göttsche
c340980b80 is_kernfs: Check only defined magic numbers
Avoid undeclared identifiers when compiling with older kernel headers.
2020-06-05 18:04:11 +02:00
Christian Göttsche
19cfe9b15c Correct misspellings 2020-05-30 19:26:00 +02:00
Yorhel
239bbf542f Version bump for 1.15 2020-05-30 10:02:02 +02:00
Yorhel
d018dc0be6 dir_import.c: Remove already-implemented TODO comment 2020-05-15 09:09:35 +02:00
Yorhel
1c4d191193 help.c: Mention "F" flag + make the flag list scrollable 2020-05-15 09:02:16 +02:00
Yorhel
bff5da3547 man page: Mention --follow-firmlinks 2020-05-15 08:51:08 +02:00
Yorhel
08564ec7b6 dir_scan.c: Call statfs() with relative path
So we get around the PATH_MAX limitation. Also a tiny bit more
efficient, I hope.
2020-05-15 08:43:45 +02:00
Saagar Jha
c9ce16a633 Support excluding firmlinks on macOS 2020-05-13 11:29:55 -07:00
Saagar Jha
684e9e04ad Typo: exlude → exclude 2020-05-07 16:10:07 -07:00
Yorhel
9a3727759c Fix calculating of directory apparent sizes with hard links
Silly one-character typo that causes directory apparent sizes to be very
off in some scenarios.

Reported & patched by Andrew Neitsch.
2020-05-06 07:04:36 +02:00
Yorhel
4a2def5223 dir_scan.c: Fix integer overflow when list of file names in dir exceeds 2GiB
Fixes #150
2020-04-21 14:13:51 +02:00
Yorhel
1563e56223 help.c: Mention new ^ file flag 2020-04-08 18:35:01 +02:00
Christian Göttsche
c209b012b1 Add option --exclude-kernfs to skip scanning Linux pseudo filesystems
(cherry picked from commit a076ac714aa6fb24e0e9eb227372df84a4b6000b)
2020-04-08 18:32:11 +02:00
Christian Göttsche
50b48a6435 Mention supported color schemes in help text 2020-04-08 17:17:06 +02:00
Christian Göttsche
e3742f0c80 Remove redundant cast to the same type
(cherry picked from commit ef7b4e5c28739c26b3a120296f9dc2ddaf2d4375)
2020-04-08 11:00:41 +02:00
Christian Göttsche
3959210051 Drop never read initialization
(cherry picked from commit 9f28920a64c155957b83324cd3a3cf0fda6020c9)
2020-04-08 10:59:25 +02:00
Christian Göttsche
84834ff370 Declare file local variables static
(cherry picked from commit ad5b7fce74a3b7b0ed726620c81ea552c643cdad)
2020-04-08 10:58:53 +02:00
Christian Göttsche
53e5080d9a Avoid using extension of variable length array folded to constant array
(cherry picked from commit 2faefc3b2432409f3ccca0b6ab53a228d5b9b00d)
2020-04-08 10:57:23 +02:00