Giter Site home page Giter Site logo

xfind's Introduction

X̸FIND

find or

filter with SK or FZF,
preview with Chroma, BatCat
edit with EDITOR

··· repeat ···

NAME ~
	xfind - find <FILES> or <DIRS>, filter with {SK} or {FZF}, preview with {Chroma}, {Bat}, {Cat} and edit with <EDITOR>, repeat;


SYNOPSIS ~
	xfind [<TYPE><DEPTH>] [-not|--not-path <GLOB>]... <GLOB>

	find files with max depth of 5 and two exclude glob and query glob >
	xfind f5 -not '*dist*' -not '**/lib/**' '*repo*.js'
<

DESCRIPTION ~
	find, filter, edit, repeat
	it will pipe the find result to a {FuzzyTool}
	it will look for {SK} and fallback to {FZF}
	for Preview of <FILES> in the {FuzzyTool}, it will look for {Chroma}, {Bat}, {Cat} in that order
	for Preview of <DIR> in the {FuzzyTool}, it will use Tree
	on Select the <EDITOR> will be invoked with the Selection

EXAMPLES ~
	find directories with max depth of 3 and one exclude glob and query glob >
	xfind d3 -not '*dist*' '*repo*'
<

	find files with max depth of 5 and two exclude glob and query glob >
	xfind f5 -not '*dist*' -not '**/lib/**' '*repo*.js'
<

	find directories named x11 with default max depth >
	xfind D x11
<

	find files named xorg with default max depth >
	xfind xorg
<
	read from stdin >
	ls | xfind
<
	read from stdin >
	git status --short | awk '{print $2}' | xfind
<


ENVIRONMENT VARIABLES ~
	XFIND_MAXDEPTH  | default max-depth
	XFIND_SILENT    | Silent Query & Result Prints (0 or 1)


SEE ALSO
	find(1), fzf(1), locate(1)


AUTHOR
	metaory <[email protected]>, Mar 2024

CONFIGURATION

  • ctrl-o toggle-preview
  • ctrl-n next
  • ctrl-p previous
  • ctrl-d preview-page-down
  • ctrl-u preview-page-up
  • enter open in $EDITOR

Installation

  • clone repo
  • give execution permissions
  • place it in your path
# Clone the repo
git clone git@github.com:metaory/xfind.git

# Navigate to repo
cd xfind

# Give execution permissions
chmod +x {xfind}

# Link it somewhere in your PATH
ln -svf $PWD/xfind /usr/bin/xfind

# Use it anywhere
xfind f2 '*lib*'

# Usage
xfind --help

TODO

  • Makefile

xfind's People

Contributors

metaory avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.