You are not logged in.

#1 2015-06-20 04:41:52

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

bfs - A breadth-first version of find

I'm writing a breadth-first version of find.  It's available on the AUR(4), and the code is on GitHub.

Currently it doesn't support any of find's options, but I plan to add support for the common ones.  It does support a "-nohidden" flag that filters out dotfiles, something surprisingly difficult to do with find.  It also supports colorization, respecting LS_COLORS.

The reason I'm writing it is mainly to integrate it with fzf, a terminal fuzzy finder.  fzf uses find by default, which means it will often fully explore a very deep directory tree before reaching the nearby file I'm looking for.  bfs ensures that shallower files always show up before deeper ones, which usually means it finds the file I want sooner.  The colorization is also nice:

$ bfs -color -nohidden | fzf --ansi

Last edited by tavianator (2015-06-20 04:42:39)

Offline

Board footer

Powered by FluxBB