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

104 Коммитов

Автор SHA1 Сообщение Дата
Yorhel
8d58297328 Year + version bump for 1.14.2 2020-02-10 16:02:26 +01:00
Yorhel
b6ddd491b3 Year + version bump for 1.14 2019-02-04 17:30:22 +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
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
14afd92ba2 Year + version bump for 1.13 2018-01-29 11:58:14 +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
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
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
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
Max Klinger
c035c3859c implement confirmation switch 2015-09-20 07:58:07 +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
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
Thomas Jarosch
a25e5f80a5 Add ability to spawn shell
Key 'b' in the browse window spawns a shell in the current directoy.

We first check the $SHELL environment variable of the user for the preferred
shell interpreter. If it's not set, we fall back to the compile time
configured default shell (usually /bin/bash).

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
2014-12-14 09:16:27 +01:00
Yorhel
efece12cfe Copyright year update 2014-01-22 15:28:20 +01:00
Yorhel
fe932c7b22 Add support for browsing empty directories
Turns out that being able to open an empty directory actually has its
uses:
- If you delete the last file in a directory, you now won't be directed
  to the parent directory anymore. This allows keeping 'd' pressed
  without worrying that you'll delete stuff outside of the current dir.
  (This is the primary motivation for doing this)
- You can now scan and later refresh an empty directory, as suggested by
  #2 in http://dev.yorhel.nl/ncdu/bug/15
2014-01-22 13:30:51 +01:00
Yorhel
3f29a46f3a Fix offset of parent-dir item 2014-01-22 12:44:51 +01:00
Yorhel
532c32c884 Add space between file size and unit suffix
As per http://dev.yorhel.nl/ncdu/bug/31
2013-07-23 10:38:37 +02:00
Yorhel
30c0b2db00 browser.c: Fix "Toggle dirs before files when sorting" functionality
This has apparently been broken since version 1.7 (v1.6-7-g5db9c2a to be
precise), yet NOBODY TOLD ME!? :-(

The OSS community has left me in despair!
2013-06-05 16:56:46 +02:00
Yorhel
0a4ad63591 Fix a few compiler warnings
Most of which made sense.
2013-05-09 16:24:15 +02:00
Chris West (Faux)
fdd86924e5 'C' sorts by items 2013-01-13 12:42:28 +00:00
Chris West (Faux)
cfcac262d1 'c' to show child item counts 2013-01-13 12:42:28 +00:00
Yorhel
aad479a19a Disallow refresh/delete after import + provide visual feedback
It's kinda annoying how you need to confirm the messages. I'd prefer
having some status bar where messages are automatically removed after a
short timeout or something. But that's more work, and for the few
cases where feedback is necessary this'll work fine, too.
2012-09-06 13:16:54 +02:00
Yorhel
fdc614126a browser.c: Display [imported] indication in title 2012-09-06 12:32:41 +02:00
Yorhel
44e63ce2e7 Added -u option to change the scan UI
This allows scanning stuff without initializing ncurses. Not too useful
at this point since ncdu will switch to an ncurses environment when it's
done anyway, but this will become more useful when the export-to-file
feature has been implemented.
2012-08-27 14:17:40 +02:00
Yorhel
e380805990 Fixed some compiler warnings and a (rather nonexistent) memory leak
This silences clang and gcc with -O2 -Wall -Wextra
2012-08-26 18:12:13 +02:00
Yorhel
0fd7dec7b0 Split calc.c into separate components (dir_(mem|scan|common).c)
The architecture is explained in dir.h. The reasons for these changes is
two-fold:
- calc.c was too complex, it simply did too many things. 399ccdeb is a
  nice example of that: Should have been an easy fix, but it introduced
  a segfault (fixed in 0b49021a), and added a small memory leak.
- This architecture features a pluggable input/output system, which
  should make a file export/import feature relatively simple.

The current commit does not feature any user interface, so there's no
feedback yet when scanning a directory. I'll get to that in a bit.

I've also not tested the new scanning code very well yet, so I might
have introduced some bugs.
2012-08-26 15:29:55 +02:00
Yorhel
7fcae11d4d Copyright year bump
Damn, it's 2012 already.
2012-01-18 11:40:50 +01:00
Yorhel
5243e2daf4 Code cleanup: Use `static' where applicable.
This should also allow compilers to generate better code.
2011-10-31 15:09:49 +01:00
Yorhel
00bd015d79 Belated copyright year bump 2011-10-31 14:47:15 +01:00
Yorhel
53e3bcbd2b browser.c: Added [read-only] indication to title bar 2011-10-31 13:10:36 +01:00
Rodolfo Borges
57164c8ca6 read-only flag 2011-09-09 08:47:41 +02:00
Yorhel
3860ba217b Display size graph by default
This used to be the default before 1.5, but for some reason the default
changed in 1.5 and 1.6. Changing it back now, because the graph really
is useful, and there's still enough space for the filename even in
smaller terminals.
2010-08-13 11:38:27 +02:00
Yorhel
791612dc4d browser.c: Got rid of the 'line' format string
This solution is far cleaner. Thanks to Ben North for pointing me to the
*-width-specifier that has apparently been built into the printf-family
functions for, well, quite a while, it seems.
2010-07-18 18:58:22 +02:00
Yorhel
d942a0ebc6 Only create the line format once when drawing the browser window
The memory for this format is now statically allocated as well. I
was under the impression its size would depend on wincols, but this is
the format we're talking about, the string does not have to hold the
actual line contents. I must have been sleeping again...

Oh well, this is a slight performance improvement, although it doesn't
seem the be the cause of the browing slowness when running under
valgrind. (Obviously running ncdu with valgrind is supposed to be
slower, but the current performance is rather bad...)
2010-04-28 17:15:46 +02:00
Yorhel
d7d782be1c Reset descending/ascending order when changing sort column
This changes the behaviour back to it was before the dirlist
abstraction, which is the behaviour I prefer.
2010-04-28 15:39:45 +02:00
Yorhel
b7ccf78b90 More intuitive multi-page browsing
Here is the new multi-page listing functionality I promised in
5db9c2aea1.

It may look very easy, but getting this to work right wasn't,
unfortunately.
2010-04-28 13:32:30 +02:00
Yorhel
79733f7d64 Determine which item to select after deletion in browser.c
Rather than the ugly hack in delete.c.
2010-04-27 17:58:17 +02:00
Yorhel
c84e70b627 Properly fixed crash on browsing dirs with a small window size
I was overseeing a stupid mistake in
  a7b7841ac0
Obviously, you need to check against wincols and not winrows...
2010-04-27 13:27:57 +02:00
Yorhel
a7b7841ac0 Fixed crash on browsing dirs with a small window size
Fixes bug #2991787
2010-04-27 12:41:01 +02:00
Yorhel
5db9c2aea1 Abstracted dir list handling from browser.c into dirlist.c
This optimizes a few actions (though not all), and makes the code easier
to understand and expand.

The behaviour of the browser has changed a bit with regards to
multi-page listings. Personally I don't like this change much, so I'd
probably fix that later on.
2010-03-07 11:10:00 +01:00
Yorhel
82ec5b9fa8 Misc. minor fixes 2010-02-28 10:13:12 +01:00
Yorhel
93a97381bd List detected links in a separate tab in info window 2010-02-27 15:21:25 +01:00
Yorhel
88cd199d94 Link hard linked files together with a circular linked list
The directory sizes are now incorrect as hard links will be counted
twice again (as if there wasn't any detection in the first place), but
this will get fixed by adding a shared size field.

This method of keeping track of hard links is a lot faster and allows
adding an interface which lists the found links.
2010-02-27 15:21:25 +01:00
Yorhel
101731ed13 Copyright year bump 2010-02-27 15:20:57 +01:00
Yorhel
06cab8cc30 Added some keybindings and changed 'h' to 'e' in browser 2009-10-18 12:52:00 +02:00
Yorhel
b7d59bee5b Properly display MiB units instead of MB
Fixes bug #2831412 (debian #539553)
2009-08-03 14:26:10 +02:00
Yorhel
fd984e754c Added hard link indicator in browser and help window 2009-05-05 19:25:52 +02:00
Yorhel
d571c080b5 Fixed a browsing bug related to hiding items
Reproducable with the following steps:
- Make sure the first item in the list is a directory starting with a dot
- Make sure the next item is a normal directory
- Select first item
- Press 'h' to hide it, next item will properly be selected
- Open selected directory (right arrow), and see how the first (hidden)
  directory was opened.

It's amazing how I've even found this bug, considering that really is the
only way to reproduce it...
2009-05-02 13:01:12 +02:00