* Branched v4.2
Added workaround for Mac OS X < 10.12.0
(Only tested on 10.11.6, lower versions may need more workaround)
* Added *.dSYM to .gitignore
* Added comments for the macosx detection in Makefile
* Fixed indentation, formatting and missing newline at eof
* Moved includes inside include guard
Co-authored-by: elder-n00b <elder-n00b@yandex.com>
* Add persistsel
* Fix Makefile spacing
* Update Haiku Makefile
* Do a double pass on inversion
* Split single and double pass for easier testing
Removed lastappendpos
Eliminate suffix matches
* Check if dir is in selection before searching for files
Fix double pass
* Switch to mainline
Optimize memory moving
Handle large selection in invertsel()
Going forward with 2pass
* Update Makefiles
* Fix style
* Move forward declarations
* Remove edit selection in inversion
Replace buf with g_buf to fix CI
Fix CI
* Style changes
* Comment the code
* Style fixes
* Fix infinite loop
* Fix crash on empty invert
* Fix off-by-one-in-two-places
Off-by-twice?
* Adopt changes from master
* Only check directory if entry in it is selected
* Better organization
* Wrong variable
* Tiny optimizations
* Style fixes and updated man page
* Update man page
* Remember where we found directory path in selection
Add in progress message on invert
Implements pthreads based du using FTS. Currently 4 threads are used.
NFTW is dropped as there is no way to pass any custom values to fn().
FTS does not require any per entry function callback.
The performance numbers are best with FTS:
./nnn-fts -T d / 5.29s user 0.94s system 116% cpu 5.335 total
1/21 du:102.402G free:8.476G files:397644 101132550144B
./nnn-ftw -T d / 5.52s user 0.94s system 116% cpu 5.534 total
1/21 du:102.400G free:8.474G files:397653 101133148160B
./nnn-4.0 -T d / 0.20s user 2.27s system 24% cpu 10.241 total
1/21 du:102.400G free:8.475G files:397654 101133299712B
If you have selected some files, you intend to work on them. Also, this prompt
expects <kbd>c</kbd> / <kbd>s</kbd> which should cancel the next prompt in the
delete workflow. Rest of the three workflows are non-fatal.
Benefits of removing this option:
- code reduction
- one less step in the relevant workflows (more than one prompt feels dragged)
This prompt shows in the following workflows:
- delete: users have explicitly requested to prefer sel over current
- batch rename: key <kbd>^R</kbd> renames a single file
- archive: in most of the cases the user would want to archive the selection
- create sym/hard link: not a frequently used workflow (in general)