Skip to content

Version 2.0

Compare
Choose a tag to compare
@tavianator tavianator released this 14 Oct 16:22
· 1278 commits to main since this release
2.0
  • #8: New -exclude <expression> syntax to more easily and reliably filter out paths.
    For example:

    bfs -name config -exclude -name .git
    

    will find all files named config, without searching any directories (or files) named .git.
    In this case, the same effect could have been achieved (more awkwardly) with -prune:

    bfs ! \( -name .git -prune \) -name config
    

    But -exclude will work in more cases:

    # -exclude works with -depth, while -prune doesn't:
    bfs -depth -name config -exclude -name .git
    
    # -exclude applies even to paths below the minimum depth:
    bfs -mindepth 3 -name config -exclude -name .git
    
  • #30: -nohidden is now equivalent to -exclude -hidden.
    This changes the behavior of command lines like

    bfs -type f -nohidden
    

    to do what was intended.

  • Optimized the iterative deepening (-S ids) implementation

  • Added a new search strategy: exponential deepening search (-S eds).
    This strategy provides many of the benefits of iterative deepening, but much faster due to fewer re-traversals.

  • Fixed an optimizer bug that could skip -empty/-xtype if they didn't always lead to an action

  • Implemented -xattrname to find files with a particular extended attribute (from macOS find)

  • Made -printf %l still respect the width specifier (e.g. %10l) for non-links, to match GNU find

  • Made bfs fail if -color is given explicitly and LS_COLORS can't be parsed, rather than falling back to non-colored output