Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | color: Don't color files like directories on ENOTDIR | Tavian Barnes | 2024-10-16 | 1 | -2/+2 |
| | |||||
* | color: Fix an infinite loop colorizing some invalid paths | Tavian Barnes | 2024-10-13 | 2 | -0/+2 |
| | | | | | | | | | | | | | | Previously, given $ touch file $ ln -s file/file notdir $ bfs notdir/file bfs would loop forever when printing the error message, since it expected stripping the trailing slash from "notdir/" to fix the ENOTDIR error, but the broken symlink still gave the same error. Fixes: b4c3201 ("color: Only highlight the trailing slash on ENOTDIR") | ||||
* | color: Fix an assertion failure with embedded NUL bytes | Tavian Barnes | 2024-10-02 | 2 | -0/+32 |
| | | | | | | | | | | | | | Leading NUL bytes (e.g. `*\0.gz=...`) could cause us to insert a non-prefix-free set of strings into the case-insensitive extension trie, which would lead to crashes like bfs: trie_split@src/trie.c:538: Assertion failed: `key_nibble != rep_nibble` and OOB accesses to trie leaf keys. Fix it by ignoring those extensions, since filenames cannot contain NUL bytes. Fixes: 08030aea ("color: Delay the case_sensitive decision") | ||||
* | eval: Don't warn about suppressed errors without -noerror | Tavian Barnes | 2024-08-19 | 1 | -0/+2 |
| | |||||
* | tests/bfs: Add -noerror tests | Tavian Barnes | 2024-08-19 | 6 | -0/+21 |
| | |||||
* | parse: Take umask into account in parse_mode() | Tavian Barnes | 2024-08-02 | 1 | -2/+3 |
| | | | | | | | POSIX 2024 clarified that find(1) is meant to work exactly like chmod(1) here, so for modes like +rw,-x with no "who" specified, apply the umask. Link: https://www.austingroupbugs.net/view.php?id=1392 | ||||
* | tests: Add more files to perms/ | Tavian Barnes | 2024-08-02 | 1 | -0/+2 |
| | |||||
* | tests/bfs: New case-sensitivity ordering test | Tavian Barnes | 2024-07-03 | 2 | -0/+28 |
| | |||||
* | color: Delay the case_sensitive decision | Tavian Barnes | 2024-07-02 | 2 | -0/+28 |
| | |||||
* | tests: Improve color case insensitivity coverage | Tavian Barnes | 2024-06-05 | 2 | -6/+6 |
| | |||||
* | tests: New inaccessible/ directory tree for permission errors | Tavian Barnes | 2024-06-04 | 2 | -10/+2 |
| | |||||
* | parse: Allow -Darg/-Sarg as well as -D arg / -S arg | Tavian Barnes | 2024-06-03 | 6 | -0/+59 |
| | |||||
* | parse: Handle multiple flags at once like -LEXO2 | Tavian Barnes | 2024-06-03 | 3 | -0/+19 |
| | | | | | | | | | | | | | | | | | | | | | The POSIX Utility Syntax Guidelines specify that flag groups like -HL should be handled like -H -L. GNU find doesn't support grouping flags in this way, but BSD find does. To avoid conflicts with non-flag primaries, for now we require at least one flag in a group to be a capital letter. That is, we support things like -Lds but not -ds. We also do not support -fPATH (without a space) as it would conflict with -follow, -fprint, etc. It is impossible to be compatible with both GNU and BSD find here: user@gnu$ find -follow link link/file ... user@bsd$ find -follow find: ollow: No such file or directory Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html | ||||
* | tests: Add some more weird names | Tavian Barnes | 2024-05-28 | 2 | -0/+16 |
| | |||||
* | bfstd: Treat ELOOP like ENOENT | Tavian Barnes | 2024-05-27 | 1 | -1/+8 |
| | | | | | | | GNU findutils just made the same change, so looping symlinks will be considered broken rather than a hard error. Link: https://savannah.gnu.org/bugs/?51926 | ||||
* | printf: The ' ' (space) flag must be numeric | Tavian Barnes | 2024-05-19 | 1 | -0/+1 |
| | |||||
* | Implement -limit N | Tavian Barnes | 2024-03-20 | 6 | -0/+9 |
| | | | | Closes: https://github.com/tavianator/bfs/issues/133 | ||||
* | tests/bfs/D_opt: Don't rely on directory link counts | Tavian Barnes | 2024-02-28 | 2 | -12/+1 |
| | | | | Fixes: https://github.com/tavianator/bfs/issues/131 | ||||
* | bftw: stat() files asynchronously | Tavian Barnes | 2024-02-06 | 1 | -1/+1 |
| | |||||
* | tests: Don't clobber inherited FDs | Tavian Barnes | 2024-02-01 | 1 | -1/+1 |
| | | | | | Rather than attempting to close any unexpected FDs, just count them and adjust our ulimit -n calls to account for them. | ||||
* | tests/bfs/D_opt: New test for more -D opt coverage | Tavian Barnes | 2024-01-07 | 2 | -0/+19 |
| | |||||
* | tests: Remove unneeded command -v unbuffer || skip | Tavian Barnes | 2024-01-01 | 2 | -4/+0 |
| | |||||
* | parse: Reject integers that start with whitespace | Tavian Barnes | 2023-12-09 | 1 | -0/+1 |
| | |||||
* | Treat NO_COLOR="" the same as unset | Tavian Barnes | 2023-11-06 | 2 | -0/+32 |
| | | | | | | | | | | | | | | The docs say > Command-line software which adds ANSI color to its output by default > should check for a NO_COLOR environment variable that, when present > and not an empty string (regardless of its value), prevents the > addition of ANSI color. but we were not checking for the empty string. Link: https://no-color.org/ Link: https://github.com/sharkdp/fd/pull/1421 | ||||
* | tests/bfs/help: Fix exit status | Tavian Barnes | 2023-10-23 | 1 | -4/+4 |
| | |||||
* | tests/bfs/help: Use ... && fail instead of ! ... | Tavian Barnes | 2023-10-23 | 1 | -4/+4 |
| | | | | ! false doesn't trigger an error with set -e. | ||||
* | tests/bfs/printf_color: Fix race condition | Tavian Barnes | 2023-10-23 | 2 | -1/+2 |
| | | | | | Invoking bfs in the top directory can lead it to explore other tests' scratch directories, so explicitly exclude them. | ||||
* | tests: Fix Bash 3 compatibility | Tavian Barnes | 2023-10-23 | 1 | -4/+2 |
| | |||||
* | tests: Use test-specific scratch directories | Tavian Barnes | 2023-10-22 | 6 | -20/+17 |
| | |||||
* | tests: Refactor implementation into separate files | Tavian Barnes | 2023-10-19 | 1 | -2/+0 |
| | |||||
* | tests: Move closed_std* tests out of the POSIX group | Tavian Barnes | 2023-10-14 | 4 | -0/+28 |
| | | | | | | | | | | | | | POSIX actually says > If the utility would be executed with file descriptor 0, 1, or 2 > closed, implementations may execute the utility with the file > descriptor open to an unspecified file. So we're not guaranteed to be able to detect the situation in the first place. Add a best-effort check for these platforms and skip the test. Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01 | ||||
* | tests/bfs/status: Try to test SIGWINCH | Tavian Barnes | 2023-10-06 | 1 | -1/+1 |
| | |||||
* | tests: New bfs_pty wrapper for unbuffer | Tavian Barnes | 2023-10-06 | 3 | -7/+3 |
| | |||||
* | tests/bfs: Add a test that runs -status | Tavian Barnes | 2023-10-05 | 1 | -0/+3 |
| | |||||
* | tests/bfs: Add tests for color autodetection | Tavian Barnes | 2023-10-05 | 4 | -0/+65 |
| | |||||
* | color: Only highlight the trailing slash on ENOTDIR | Tavian Barnes | 2023-07-13 | 2 | -5/+5 |
| | |||||
* | color: Don't break up leading and trailing dirs | Tavian Barnes | 2023-07-13 | 39 | -61/+63 |
| | |||||
* | color: TTY-escape filenames | Tavian Barnes | 2023-07-13 | 38 | -0/+76 |
| | |||||
* | color: Get rid of EXT_MAX | Tavian Barnes | 2023-07-13 | 2 | -0/+23 |
| | |||||
* | parse: Reject -j0 | Tavian Barnes | 2023-07-12 | 1 | -0/+1 |
| | |||||
* | tests/bfs: Add tests for -j | Tavian Barnes | 2023-07-12 | 5 | -0/+41 |
| | |||||
* | color: Compare values too when deciding to smart-case | Tavian Barnes | 2023-06-30 | 2 | -2/+7 |
| | |||||
* | color: Implement smart casing | Tavian Barnes | 2023-06-29 | 5 | -10/+12 |
| | | | | | | | | | Since coreutils 9.2, ls does case-sensitive extension matching if the same extension is capitalized differently in $LS_COLORS. Implement the same logic. Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33123 Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9086 | ||||
* | tests/bfs/color: Add mixed-case extensions | Tavian Barnes | 2023-06-29 | 38 | -114/+304 |
| | |||||
* | color: `fi=0` should not fall back to `no` | Tavian Barnes | 2023-06-08 | 8 | -0/+84 |
| | |||||
* | tests: Use bfs_sudo wrapper instead of testing $SUDO | Tavian Barnes | 2022-12-29 | 2 | -4/+2 |
| | |||||
* | tests/bfs/printf_everything: Simplify double negation | Tavian Barnes | 2022-12-16 | 1 | -2/+2 |
| | |||||
* | tests: Fail early in bfs_diff if the diff fails | Tavian Barnes | 2022-12-16 | 1 | -1/+1 |
| | | | | Otherwise, propagate the exit code from bfs | ||||
* | tests: Print the skip reason for --verbose=skipped | Tavian Barnes | 2022-12-16 | 1 | -4/+1 |
| | |||||
* | tests: Turn on set -e | Tavian Barnes | 2022-12-16 | 4 | -12/+9 |
| |