1
1

367 Коммитов

Автор SHA1 Сообщение Дата
Martin Storsjö
8e021a46ee dir_setlasterr: strcpy the right variable 2019-02-18 23:50:17 +02:00
Yorhel
b6ddd491b3 Year + version bump for 1.14 2019-02-04 17:30:22 +01:00
Yorhel
882a32613d symlinks: Only call stat_to_dir() once, impove manual
stat_to_dir() assumes that buf_dir is clean; calling it twice breaks
that asumption.
2019-01-24 08:56:19 +01:00
Simon Doppler
74efdfaf97 Add a '--follow-symlinks' option
Symlink loops are handled by the stat(2) syscall. Symlinks pointing to a
directory are ignored (to avoid loops in the recursive scan).
2019-01-24 08:24:09 +01:00
Yorhel
2409cc7a32 Fix minor typo 2019-01-21 07:38:56 +01:00
Alex Wilson
60fdac0680 add a max modified time, or mtime, view and sorting
This adds an 'm' command to show the latest modified time of all files
in a directory. The 'M' command allows for ascending and descending
mtime sorting. These are only enabled with the -e flag and overload
the dir_ext mtime field.
2019-01-21 07:33:24 +01:00
Yorhel
2501fb1ad5 Fix crash when attempting to sort an empty directory
I had taken care to not sort empty directories during dirlist_open(),
but forgot that manual user actions can still cause dirlist_set_sort()
to be called, which does not handle empty directories.

Reported by Alex Wilson.
2019-01-20 16:43:59 +01:00
Yorhel
93583e645f Add --help flag as alias for -h
https://dev.yorhel.nl/ncdu/bug/125
2018-12-16 10:47:51 +01:00
Yorhel
bf8068b65e Slightly improve hardlink circular list insertion performance
Based on https://dev.yorhel.nl/ncdu/bug/124
2018-12-01 07:53:51 +01:00
Yorhel
d95c65b032 Add -V and --version as alias to -v 2018-09-03 22:19:55 +02:00
Yorhel
9f2350bbc9 Display larger file counts in browser UI
Implements https://dev.yorhel.nl/ncdu/bug/43
2018-07-24 18:03:18 +02:00
Yorhel
cbe24d6c8f Exit ncdu when losing input
Ought to fix https://dev.yorhel.nl/ncdu/bug/115
2018-06-13 17:16:02 +02:00
Yorhel
d15fe8d08e Spelling fixes: "occured" + "an other"
https://dev.yorhel.nl/ncdu/bug/112
2018-03-29 17:32:48 +02:00
Yorhel
fa19095e26 Fix '--color off'
https://dev.yorhel.nl/ncdu/bug/111
2018-03-29 17:20:43 +02:00
Yorhel
31126c6552 man page/file flags: Minor rewording + use same order as help screen 2018-02-21 18:59:24 +01:00
Thomas McWork
726b1542c6 shift section; adapt to online help wording 2018-02-21 18:55:03 +01:00
Thomas McWork
48a266c348 add a file flags section in the docs 2018-02-21 18:55:03 +01:00
Yorhel
14afd92ba2 Year + version bump for 1.13 2018-01-29 11:58:14 +01:00
Yorhel
7ba0f15f80 delete.c: Fix signedness issue in confirmation selection
'char' may be unsigned on some architectures, which will cause the
"overflow check" on decrement to fail.

This would at most result in a confusing UI issue where no confirmation
option appears to be selected.
2018-01-29 11:58:14 +01:00
Yorhel
8107831a2b Update static binary generation script 2018-01-23 15:56:39 +01:00
Yorhel
0e26ea95ef dirlist.c: make sure to include stdlib.h for calloc() 2018-01-23 15:36:27 +01:00
Yorhel
3e6affa73d Display extended information in the info window
It's looking a bit cramped, but I'm lazy.
2018-01-23 14:59:46 +01:00
Yorhel
1165342dcf Don't depend on current color when creating ncurses window
Fixes a minor glitch where A_REVERSE would be set on the information
window if the last item in the dir is selected.
2018-01-23 14:20:10 +01:00
Yorhel
40b127591f Import/export extended information
And stick to the more portable second resolution timestamps for mtime.
2018-01-23 14:11:42 +01:00
Yorhel
47e969cdf3 Add -e flag to enable extended information mode
And document the --color flag that I forgot.
2018-01-23 13:45:16 +01:00
Yorhel
77aca35fce Add support for optional "extended" information for each file/dir entry
Unfortunately, there wasn't a single bit free in struct dir.flags, so I
had to increase its size to 16 bit. This commit is just the initial
preparation, there's still a few things to do:

- Add "extended information" cli flag to enable/disable this
  functionality.
- Export and import extended information when requested
- Do something with the data.

I also did a few memory measurements on a file list with 12769842 items:

  before this commit:    1.239 GiB
  without extended info: 1.318 GiB
  with extended info:    1.698 GiB

It's surprising what adding a single byte to a struct can do to the
memory usage. :(
2018-01-23 13:17:06 +01:00
Yorhel
7338454322 Remove recursion check when importing a file
Fixes https://dev.yorhel.nl/ncdu/bug/103

I don't think a stack overflow as a result of recursion is exploitable
on a modern system. It should just result in an unfortunate write to a
page that is not writable, followed by a crash.
2018-01-21 16:31:48 +01:00
Yorhel
f1112297ca Merge branch 'colors' 2018-01-21 15:42:16 +01:00
Yorhel
6c2ee0d6ab Add --color option, simple theme support, disable colors by default
I've decided not to use ls-like file name coloring for now, instead just
coloring the difference between a (regular) file and a dir.

Still looking for a good color scheme for light backgrounds.
2018-01-21 15:41:54 +01:00
Yorhel
a830f7dfa6 Use C99 flexible array member for struct dir
This should fix https://dev.yorhel.nl/ncdu/bug/99 - with the downside
that this requires a C99 compiler.

I also replaced all occurrences of static allocation of struct dir with
use dynamic allocation, because I wasn't really sure if static
allocation of flexible structs is allowed. In the case of dirlist.c the
dynamic allocation is likely required anyway, because it does store a
few bytes in the name field.
2017-08-17 17:04:48 +02:00
Yorhel
a369a43d94 Add support for colors and sprinkle some colors around
TODO:
- Add (ls-like) colors to the actual file names
  -> Implement full $LS_COLORS handling or something simple and custom?
- Test on a white/black terminal, and provide an alternate color scheme
  if necessary.
- Make colors opt-in?
2017-07-08 16:29:31 +02:00
Yorhel
3b55f8c137 dir_import.c: Restart fread() on EINTR
Fixes https://dev.yorhel.nl/ncdu/bug/95
2017-03-27 17:14:22 +02:00
Yorhel
936a9446a8 Add -rr option to disable shell spawning
Fixes https://dev.yorhel.nl/ncdu/bug/94
2017-01-06 18:35:30 +01:00
Yorhel
e4f211db68 Year + version bump for 1.12 2016-08-24 20:59:58 +02:00
Yorhel
502d029509 Minor documentation changes
Sneaky change from using mc as an example to using vifm. It's closer to
ncdu in spirit.
2016-08-24 20:30:15 +02:00
Tillmann Karras
dcf08bd8bb Consistently print errors to stderr 2016-01-12 20:00:24 +01:00
piyo
cf9145a783 Confirm quit action during scan only when --confirm-quit 2015-09-23 15:44:32 +09:00
piyo
bfff5762e0 Confirm quit action during scan (reuse existing scan dialog). 2015-09-23 15:44:32 +09:00
Max Klinger
c035c3859c implement confirmation switch 2015-09-20 07:58:07 +02:00
Max Klinger
5aeb4f9b09 change wording when deleting empty directory 2015-09-20 07:54:43 +02:00
Yorhel
078369b8c5 quit.c: Remove two unused variables 2015-09-20 07:53:05 +02:00
piyo
e96cc36d56 Confirm quit action with a cancellable dialog. 2015-09-19 12:36:38 +09:00
Robin Schneider
682add5eae Added backspace key in browser window to back keys (one directory up). 2015-08-03 21:16:19 +02:00
Øyvind A. Holm
3a21a634f4 doc: Document /bin/sh as default shell
The default shell was changed from /bin/bash to /bin/sh in commit
61a7846 ("config: Use /bin/sh as default shell and don't check for its
existence", 2015-04-05), update the documentation about this.
2015-06-02 05:32:47 +02:00
Øyvind A. Holm
7be85679c5 Check for NCDU_SHELL environment variable when spawning shell
Check if the environment variable NCDU_SHELL is defined before the SHELL
variable is checked. This makes it possible to specify a program to
execute when 'b' is pressed. Setting SHELL to for example "mc" (Midnight
Commander) didn't work because mc already uses SHELL to execute
commands.
2015-06-02 04:06:09 +02:00
Yorhel
7ca912e452 ChangeLog: Fix date of 1.11 release -.- 2015-05-07 15:28:15 +02:00
Yorhel
29f347c19c shell.c: Include sys/wait.h
Required for the W* macros on OpenBSD. Reported by Brian Callahan.
2015-04-07 10:39:46 +02:00
Yorhel
c0334e071a static: Update to latest musl-cross version 2015-04-05 10:22:38 +02:00
Yorhel
f8ce052630 Version bump + Changelog update for 1.11 2015-04-05 10:06:35 +02:00
Yorhel
9e549b0319 Disable shell feature on imported file
Can cause too much confusion otherwise; The imported data may not at all
reflect the filesystem that ncdu has access to.
2015-04-05 10:03:32 +02:00