summaryrefslogtreecommitdiffstats
path: root/color.c
AgeCommit message (Collapse)Author
2020-09-18stat: Rename bfs_stat_flag to _flagsTavian Barnes
Flags enums should be plural.
2020-09-18Don't call stat() just to determine symbolic lengthsTavian Barnes
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.
2020-07-29bftw: Rename bftw_typeflag to bftw_type, and make it not a bitmaskTavian Barnes
2020-06-02diag: Unify debug printingTavian Barnes
2020-03-20parse: Prettify some errors and warningsTavian Barnes
2019-09-04color: Actually resolve symlinks against their parent directoryTavian Barnes
2019-09-03color: Fix unsigned < 0 comparisonTavian Barnes
2019-09-03color: Fix directory coloring when resolving symlinks at the rootTavian Barnes
2019-08-23color: Color leading directories as errors if they don't existTavian Barnes
Fixes #51.
2019-06-27color: Fix a crash if LS_COLORS ends in *Tavian Barnes
2019-06-27color: Fix a crash if strndup() failsTavian Barnes
2019-05-24fsade: Refactor the POSIX.1e abstractionsTavian Barnes
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.
2019-05-05color: Don't stat() if we don't need toTavian Barnes
2019-05-05bftw: Pass a const struct BFTW * to the callbackTavian Barnes
2019-05-04bftw: Add a caching stat() API to struct BFTWTavian Barnes
2019-05-04stat: Unify the flags argumentsTavian Barnes
2019-04-20trie: Make trie_remove() take a leaf instead of a keyTavian Barnes
2019-03-28color: Implement ln=targetTavian Barnes
With ln=target in LS_COLORS, links should be colored according to their target's stat() info, not their own.
2019-03-28color: Implement escape sequence parsingTavian Barnes
GNU ls allows custom escape sequences inside color values, including control characters and embedded NULs.
2019-03-27trie: Store void* values rather than const void*Tavian Barnes
Fewer casts needed this way.
2019-03-17color: Match the behaviour of GNU ls more closelyTavian Barnes
2019-03-04color: Use a trie to store file extension colorsTavian Barnes
This new implementation is about 14% faster overall at printing colored files.
2019-02-09Add some documentation commentsTavian Barnes
2019-01-11color.c: Fix an out-of-bounds read if LS_COLORS doesn't end in a colonTavian Barnes
2019-01-02posix1e: Split out ACL and capability handling from utilTavian Barnes
2019-01-02color: Fix more incompatibilities with GNU lsTavian Barnes
2019-01-02color: Check format strings + args for cfprintf()Tavian Barnes
%{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.
2019-01-02diag: Unify diagnostic formattingTavian Barnes
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.
2018-12-28color: Don't bail out on colors that exist but are NULLTavian Barnes
2018-12-17color: Support coloring files with capabilitiesTavian Barnes
2018-12-17color: Make extension detection case-insensitiveTavian Barnes
It's what GNU ls does.
2018-12-17color: Don't print the leading directory color if there's no leading directoryTavian Barnes
2018-09-24Update copyright datesTavian Barnes
2018-01-08stat: New wrapper around the stat() familyTavian Barnes
This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times.
2017-11-13color: Optimize cfprintf() a bitTavian Barnes
2017-11-13color: Implement %m for cfprintf()Tavian Barnes
2017-10-21parse: Keep track of what files are already openTavian Barnes
Fixes #22
2017-10-21Report errors that occur when closing filesTavian Barnes
Otherwise we miss write errors that occur when flushing the cache.
2017-09-20util: Wrap faccessat() to fix some portability issuesTavian Barnes
2017-08-27Implement cost-based optimizationTavian Barnes
2017-07-27Re-license under the BSD Zero Clause LicenseTavian Barnes
2017-05-15Add colors to -D treeTavian Barnes
2017-04-30Pass AT_EACCESS to faccessat()Tavian Barnes
That's the form that actually answers the expected question ("can I open() this"), and the only form Hurd supports.
2017-04-24Release 1.01.0Tavian Barnes
2017-04-16Make -help output prettier and more completeTavian Barnes
2017-03-16Color link targets for -lsTavian Barnes
Fixes #18.
2017-03-16Give struct expr a CFILE* instead of just a FILE*Tavian Barnes
This unifies the behaviour of -print and -fprint /dev/stdout.
2017-03-11Make a printf()-style API for colored messagesTavian Barnes
2016-11-24Update some copyright dates.Tavian Barnes
2016-10-16Check for errors in -print and friends.Tavian Barnes