about summary refs log tree commit diff
path: root/lr.c
Commit message (Collapse)AuthorAgeFilesLines
* allow -l and -F in any orderLeah Neukirchen2023-08-121-1/+1
| | | | | | -l takes preference (and implies -F). Closes #24.
* bump copyright yearsLeah Neukirchen2023-08-051-1/+1
|
* color_size_on: fix typo, the cut-off is meant to be 2GLeah Neukirchen2023-08-011-1/+1
|
* print_comma: don't truncate outputLeah Neukirchen2023-08-011-1/+1
| | | | Previously, large file sizes were truncated when -W or -U was used.
* default to _FILE_OFFSET_BITS=64 to allow stat'ing large files on 32-bit glibcLeah Neukirchen2023-08-011-0/+4
| | | | Fixes #23.
* recurse: initialize stat bufferLeah Neukirchen2022-09-101-1/+1
| | | | Closes #22.
* recurse: fix error detectionLeah Neukirchen2022-09-101-1/+1
|
* add -of to sort by file basename.Leah Neukirchen2022-08-261-0/+2
| | | | Closes #21.
* print_noprefix: only drop char after prefixl if it is a /Leah Neukirchen2021-06-251-1/+2
| | | | | | | | | | | | | Else the first character gets lost in this example: % mkdir -p service/src service/test % touch service/src/foo.c %lr -B -s service/src service/test . . oo.c Reported by @Profpatsch.
* count_entries: fix when fi->fpath is "" (at toplevel)Leah Neukirchen2020-08-041-1/+1
| | | | Reported by @Profpatsch.
* fix -ALeah Neukirchen2020-01-121-1/+1
| | | | Found by Valodim.
* update copyright yearsLeah Neukirchen2020-01-011-1/+1
|
* recurse: pass guesssubdir with -WLeah Neukirchen2019-12-191-11/+17
|
* make code C89Leah Neukirchen2019-12-191-3/+5
|
* don't use // commentsLeah Neukirchen2019-12-191-31/+32
|
* add -W to sort results by name and print during traversalLeah Neukirchen2019-12-051-7/+45
|
* print_shquoted: fast-path for unescaped file name outputLeah Neukirchen2019-12-051-1/+7
|
* initialize new.totalLeah Neukirchen2019-12-051-0/+1
|
* only hide directories, other entries can just be droppedLeah Neukirchen2019-03-151-1/+1
|
* define a hidden color and use it for -B so traversal can continueLeah Neukirchen2019-03-151-5/+16
|
* update copyright yearsLeah Neukirchen2019-02-081-1/+1
|
* parse_string: off-by-one for reallocationLeah Neukirchen2019-01-291-1/+1
|
* callback: ensure trailing nul byteLeah Neukirchen2018-08-081-1/+1
|
* print_shquoted: respect QflagLeah Neukirchen2018-04-171-1/+1
|
* bump copyright messageLeah Neukirchen2018-04-051-1/+1
|
* support $NO_COLORLeah Neukirchen2018-01-291-0/+2
| | | | http://no-color.org/
* print file size in groups of three digits when -G is usedLeah Neukirchen2017-11-241-2/+23
| | | | | We use a custom printing function as %'jd is locale-dependent (and not implemented in musl).
* add -P for $'...' escaping, verify UTF-8 filenamesLeah Neukirchen2017-11-241-17/+92
| | | | Closes #1.
* print_format: add escapes for octal and hex bytesLeah Neukirchen2017-11-191-2/+27
|
* callback: free unregistered fileinfo immediatelyLeah Neukirchen2017-11-131-5/+7
|
* set sensible default widths for -ULeah Neukirchen2017-11-131-0/+10
|
* traverse: avoid out of bounds readLeah Neukirchen2017-11-131-1/+1
|
* add action 'skip' which is always falseLeah Neukirchen2017-11-121-0/+5
|
* revert making prune be falseLeah Neukirchen2017-11-121-2/+2
| | | | | This makes things more confusing in the end (and is not how find(1) works either).
* fitree_walk: don't crash on empty treeLeah Neukirchen2017-11-121-0/+2
|
* replace use of <search.h> (tsearch etc.) with own tree implementationLeah Neukirchen2017-11-101-127/+242
| | | | | | | | tsearch(3) can be terribly inefficient on some systems, degrading to linear search. This AA-tree implementation is not measurably slower than e.g. musl's AVL tree implementation. Meanwhile, get rid of the silly tsearch API.
* replace GNU-extension tdestroy(3) with something portableLeah Neukirchen2017-11-081-3/+7
|
* fix -1 and -ALeah Neukirchen2017-11-081-2/+2
|
* make prune evaluate to falseLeah Neukirchen2017-11-081-1/+1
|
* add ternary (conditional) operatorLeah Neukirchen2017-11-081-4/+32
|
* new option -B for breadth first searchLeah Neukirchen2017-11-081-11/+55
| | | | | | | | We use two trees and add the newly found files to the other one, then loop until no more files are found. prune, -t, -L and -x work, depth needs a slight hack; loop detection and -U doesn't work.
* free fileinfo when -U is usedLeah Neukirchen2017-11-081-3/+15
|
* callback: use ino_t for entry count.Leah Neukirchen2017-11-081-2/+3
|
* define PATH_MAX to a sensible upper bound if undefinedLeah Neukirchen2017-11-071-0/+5
|
* readlin: check if buffer is too smallLeah Neukirchen2017-11-071-2/+2
|
* scan_filesystems: on Linux, try /proc/mounts if _PATH_MOUNTED does not existLeah Neukirchen2017-11-041-0/+2
| | | | (Discovered on WSL 1703)
* eval: clean up codeLeah Neukirchen2017-11-031-11/+11
|
* scan_filesystems: support DragonFlyBSDLeah Neukirchen2017-10-171-1/+1
|
* add -e REGEX as a shortcut to filter basenamesLeah Neukirchen2017-09-201-32/+39
|
* recurse: guard DT_DIR optimizationLeah Neukirchen2017-09-171-0/+4
|