Commit graph

79 commits

Author SHA1 Message Date
Yorhel
cd38a62aa8 Clear errno before getch()
Fixes #128.
2019-04-19 15:01:58 +02:00
Yorhel
b6ddd491b3 Year + version bump for 1.14 2019-02-04 17:30:22 +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
93583e645f Add --help flag as alias for -h
https://dev.yorhel.nl/ncdu/bug/125
2018-12-16 10:47:51 +01:00
Yorhel
d95c65b032 Add -V and --version as alias to -v 2018-09-03 22:19:55 +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
fa19095e26 Fix '--color off'
https://dev.yorhel.nl/ncdu/bug/111
2018-03-29 17:20:43 +02:00
Yorhel
14afd92ba2 Year + version bump for 1.13 2018-01-29 11:58:14 +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
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
Tillmann Karras
dcf08bd8bb Consistently print errors to stderr 2016-01-12 20:00:24 +01: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
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
79213f0d63 Support building without locale.h
Slightly modified patch from Gianluigi Tiesi.
http://dev.yorhel.nl/ncdu/bug/47
2014-04-13 08:35:46 +02:00
Yorhel
efece12cfe Copyright year update 2014-01-22 15:28:20 +01:00
Yorhel
0e9e6d511a Add --si flag for base 10 prefixes
This is a slightly modified patch contributed at

  http://dev.yorhel.nl/ncdu/bug/35
2013-07-23 10:33:24 +02:00
Yorhel
09c444753a Move khash & yopt to deps/
Both microlibraries come from another source, and are not maintained as
part of ncdu. This separation of src/ and deps/ makes the relation more
clear.
2013-04-25 08:11:39 +02:00
Petr Pudlak
2784d82a9e CACHEDIR.TAG - improve code style and the name of the parameter.
Use a macro instead of the global constant `cachedir_tag_signature`.
Use `memcmp` instead of `strncmp`.
Add `has_cachedir_tag` to exclude.h.

(See http://dev.yorhel.nl/ncdu/bug/30)
2013-04-12 14:53:33 +02:00
Petr Pudlak
3def47c331 Add CACHEDIR.TAG support.
A new command line parameter allows to filter out directories containing
the proper `CACHEDIR.TAG` file.
See http://www.brynosaurus.com/cachedir/
2013-04-10 16:50:57 +02:00
Chris West (Faux)
c4f5f370ac use the locale's thousand seperator, if available 2013-01-13 12:42:28 +00:00
Yorhel
7feaeb1483 Abstracted option parsing from option handling
This also adds the possibility to combine short options that expect an
argument, e.g. "-xo <file>" or even "-xo<file>".
2012-09-08 14:38:15 +02:00
Yorhel
b6e4092ea7 cli: Use -0,-1,-2 instead of "-u n"
I've no idea for what other purpose I'd use numbered options. This is
much shorter, and can easily be combined with other options (e.g. -rx1).
2012-09-06 14:11:44 +02:00
Yorhel
c298e32942 Check that stdin is a tty when initializing ncurses 2012-09-06 09:33:58 +02:00
Yorhel
10dca5503a Added -f option to import an exported directory structure
This is the first working version. There's a few TODO's left.
2012-09-05 13:52:12 +02:00
Yorhel
7ccb98006a Support exporting to stdout while still allowing -u 2 to work 2012-08-29 10:26:37 +02:00
Yorhel
59a9c6b877 Added -o option to export dir structure to a JSON-encoded file
!WARNING! The export option is experimental, and the file format is not
final. I make no promise that a future version of ncdu will be able to
read the current format. There's also quite a few TODO's left.
2012-08-28 17:22:33 +02:00
Yorhel
dfbeed9daf Fixing some whitespace issues 2012-08-27 21:51:08 +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
5064b4d651 Re-added scanning UI and improved error handling 2012-08-26 17:08:10 +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
a87e90c3c2 main.c: Revert nodelay() status after calling ncresize()
This fixes a bug where ncdu would stop scanning a directory if the
terminal window has been resized to a small enough space that the
warning would show up.
2012-08-18 08:47:39 +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
Rodolfo Borges
57164c8ca6 read-only flag 2011-09-09 08:47:41 +02:00
Yorhel
101731ed13 Copyright year bump 2010-02-27 15:20:57 +01:00
Yorhel
adaf8a6098 Call setlocale() at initialization
This (in combination with linking to ncursesw) fixes the display of
non-ASCII characters.
2009-10-18 12:05:36 +02:00
Yorhel
aef88fb773 Removed the ST_QUIT state
There shouldn't be a need for such a state when there's a central
place where the program execution keeps returning to.
2009-05-12 19:06:15 +02:00
Yorhel
219ae8a6db Removed useless call to path_real() 2009-04-26 12:45:42 +02:00
Yorhel
290c7a7d70 Renamed ncdu.h to global.h and #included all other header files into that
So we're actually back to having one header file for everything,
except it's now maintainable.
2009-04-26 11:08:40 +02:00
Yorhel
ba243df042 Centralized screen update delay into input_handle() 2009-04-26 09:49:51 +02:00
Yorhel
00217dd86e Fixed segfault on specifying a dir to process from cli 2009-04-24 18:18:17 +02:00
Yorhel
124296ee19 Fixed infinite calc_process() on error 2009-04-24 18:17:34 +02:00
Yorhel
731bfccfb5 Removed PATH_MAX reliance in main.c 2009-04-23 22:12:50 +02:00
Yorhel
bb7119c642 main.c should include help.h 2009-04-23 20:47:01 +02:00
Yorhel
ba4d06e09e (partly) rewrote delete.c for the new framework and re-added the deletion feature 2009-04-19 11:38:35 +02:00