Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Don't truncate files until we know they're not duplicates | Tavian Barnes | 2021-09-26 | 1 | -37/+2 |
| | |||||
* | util: New xfopen() utility | Tavian Barnes | 2021-09-21 | 1 | -1/+1 |
| | | | | | And use it to pass O_CLOEXEC to all FILE*'s, so the files opened for -fprint etc. don't get passed to the programs run by -exec etc. | ||||
* | color: Fix a leak on unknown color keys | Tavian Barnes | 2021-06-16 | 1 | -2/+7 |
| | | | | Previously reproducible with LS_COLORS="asdf=0" bfs. | ||||
* | bftw: Fix bftw_type() for broken links and BFS_STAT_FOLLOW | Tavian Barnes | 2021-03-10 | 1 | -8/+5 |
| | | | | This fixes link target coloring for broken links with -L. | ||||
* | Update copyright dates | Tavian Barnes | 2021-02-05 | 1 | -1/+1 |
| | |||||
* | dir: New DIR* facade | Tavian Barnes | 2021-01-28 | 1 | -12/+13 |
| | |||||
* | Give messages to unconditional assertion failures | Tavian Barnes | 2020-12-02 | 1 | -1/+1 |
| | |||||
* | color: Add an intermediate buffer | Tavian Barnes | 2020-11-28 | 1 | -68/+102 |
| | | | | | | | cfprintf() on an unbuffered file like stderr was causing a lot of write() calls since every format specifier resulted in a separate fwrite(). This led to inefficiency and bad interleaving. Add our own dstring buffer to smooth it out. | ||||
* | Include what I use | Tavian Barnes | 2020-11-12 | 1 | -1/+2 |
| | | | | Thanks to https://github.com/include-what-you-use/include-what-you-use | ||||
* | Enable -Wsign-compare to catch bugs like 726d7801 | Tavian Barnes | 2020-11-04 | 1 | -1/+1 |
| | |||||
* | stat: Rename bfs_stat_flag to _flags | Tavian Barnes | 2020-09-18 | 1 | -5/+5 |
| | | | | Flags enums should be plural. | ||||
* | Don't call stat() just to determine symbolic lengths | Tavian Barnes | 2020-09-18 | 1 | -5/+2 |
| | | | | | | | The new bftw_cached_stat() helper gets us stat info if we already have it, but doesn't call stat() if we don't. In that case we just take a guess for the initial length to readlinkat(). This lets us avoid stat() entirely in many cases for -lname and -printf %l. | ||||
* | bftw: Rename bftw_typeflag to bftw_type, and make it not a bitmask | Tavian Barnes | 2020-07-29 | 1 | -5/+5 |
| | |||||
* | diag: Unify debug printing | Tavian Barnes | 2020-06-02 | 1 | -0/+71 |
| | |||||
* | parse: Prettify some errors and warnings | Tavian Barnes | 2020-03-20 | 1 | -1/+1 |
| | |||||
* | color: Actually resolve symlinks against their parent directory | Tavian Barnes | 2019-09-04 | 1 | -1/+1 |
| | |||||
* | color: Fix unsigned < 0 comparison | Tavian Barnes | 2019-09-03 | 1 | -1/+1 |
| | |||||
* | color: Fix directory coloring when resolving symlinks at the root | Tavian Barnes | 2019-09-03 | 1 | -27/+42 |
| | |||||
* | color: Color leading directories as errors if they don't exist | Tavian Barnes | 2019-08-23 | 1 | -5/+74 |
| | | | | Fixes #51. | ||||
* | color: Fix a crash if LS_COLORS ends in * | Tavian Barnes | 2019-06-27 | 1 | -5/+10 |
| | |||||
* | color: Fix a crash if strndup() fails | Tavian Barnes | 2019-06-27 | 1 | -5/+5 |
| | |||||
* | fsade: Refactor the POSIX.1e abstractions | Tavian Barnes | 2019-05-24 | 1 | -2/+2 |
| | | | | | | | Since we're going to want to abstract more things that aren't part of POSIX.1e (like xattrs) in a similar way, let's give this a more generic name. And while we're at it, give it some more precise error reporting, and add some tests. | ||||
* | color: Don't stat() if we don't need to | Tavian Barnes | 2019-05-05 | 1 | -26/+44 |
| | |||||
* | bftw: Pass a const struct BFTW * to the callback | Tavian Barnes | 2019-05-05 | 1 | -6/+6 |
| | |||||
* | bftw: Add a caching stat() API to struct BFTW | Tavian Barnes | 2019-05-04 | 1 | -39/+30 |
| | |||||
* | stat: Unify the flags arguments | Tavian Barnes | 2019-05-04 | 1 | -5/+5 |
| | |||||
* | trie: Make trie_remove() take a leaf instead of a key | Tavian Barnes | 2019-04-20 | 1 | -3/+3 |
| | |||||
* | color: Implement ln=target | Tavian Barnes | 2019-03-28 | 1 | -18/+57 |
| | | | | | With ln=target in LS_COLORS, links should be colored according to their target's stat() info, not their own. | ||||
* | color: Implement escape sequence parsing | Tavian Barnes | 2019-03-28 | 1 | -196/+396 |
| | | | | | GNU ls allows custom escape sequences inside color values, including control characters and embedded NULs. | ||||
* | trie: Store void* values rather than const void* | Tavian Barnes | 2019-03-27 | 1 | -1/+1 |
| | | | | Fewer casts needed this way. | ||||
* | color: Match the behaviour of GNU ls more closely | Tavian Barnes | 2019-03-17 | 1 | -23/+19 |
| | |||||
* | color: Use a trie to store file extension colors | Tavian Barnes | 2019-03-04 | 1 | -48/+82 |
| | | | | | This new implementation is about 14% faster overall at printing colored files. | ||||
* | Add some documentation comments | Tavian Barnes | 2019-02-09 | 1 | -0/+20 |
| | |||||
* | color.c: Fix an out-of-bounds read if LS_COLORS doesn't end in a colon | Tavian Barnes | 2019-01-11 | 1 | -9/+9 |
| | |||||
* | posix1e: Split out ACL and capability handling from util | Tavian Barnes | 2019-01-02 | 1 | -0/+1 |
| | |||||
* | color: Fix more incompatibilities with GNU ls | Tavian Barnes | 2019-01-02 | 1 | -14/+17 |
| | |||||
* | color: Check format strings + args for cfprintf() | Tavian Barnes | 2019-01-02 | 1 | -82/+105 |
| | | | | | | %{cc} is now ${cc} to avoid warnings about an unrecognized format specifier, and %P and %L are now %pP and %pL to make them look more like standard format strings. | ||||
* | diag: Unify diagnostic formatting | Tavian Barnes | 2019-01-02 | 1 | -23/+22 |
| | | | | | | This adds a bfs: prefix to error/warning messages for consistency with other command line tools, and leaves only the "error:"/"warning:" part colored like GCC. It also uniformly adds full stops after messages. | ||||
* | color: Don't bail out on colors that exist but are NULL | Tavian Barnes | 2018-12-28 | 1 | -14/+7 |
| | |||||
* | color: Support coloring files with capabilities | Tavian Barnes | 2018-12-17 | 1 | -0/+2 |
| | |||||
* | color: Make extension detection case-insensitive | Tavian Barnes | 2018-12-17 | 1 | -8/+18 |
| | | | | It's what GNU ls does. | ||||
* | color: Don't print the leading directory color if there's no leading directory | Tavian Barnes | 2018-12-17 | 1 | -23/+22 |
| | |||||
* | Update copyright dates | Tavian Barnes | 2018-09-24 | 1 | -1/+1 |
| | |||||
* | stat: New wrapper around the stat() family | Tavian Barnes | 2018-01-08 | 1 | -11/+12 |
| | | | | | This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times. | ||||
* | color: Optimize cfprintf() a bit | Tavian Barnes | 2017-11-13 | 1 | -76/+86 |
| | |||||
* | color: Implement %m for cfprintf() | Tavian Barnes | 2017-11-13 | 1 | -0/+7 |
| | |||||
* | parse: Keep track of what files are already open | Tavian Barnes | 2017-10-21 | 1 | -2/+0 |
| | | | | Fixes #22 | ||||
* | Report errors that occur when closing files | Tavian Barnes | 2017-10-21 | 1 | -0/+2 |
| | | | | Otherwise we miss write errors that occur when flushing the cache. | ||||
* | util: Wrap faccessat() to fix some portability issues | Tavian Barnes | 2017-09-20 | 1 | -1/+1 |
| | |||||
* | Implement cost-based optimization | Tavian Barnes | 2017-08-27 | 1 | -0/+16 |
| |