Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

109 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fzfX

fzfX multiplies the power of fzf by providing zero-configuration battle-tested applications to common use cases of fzf. It delivers the power of finding, previewing, editing and managing any file in few key strokes.

It is agnostic and does not require a specific terminal emulator, desktop environment or text editor. It builds on modern CLI tools: fzf, fd and ripgrep are required, while bat, rga, grc, tree and others are optional and gracefully fall back to classic counterparts like cat and ls when absent.

Find files anywhere

fzfx

By default it will use $HOME as the search path but that can be overrided or disabled entirely.

Optionally the search path can be inputted in the command. Which will also work for other modes.

fzfx <searchPath>

Find anything

fzfx hidden

By default hidden files, cache/vendor directories like node_modules (see /usr/share/fzfx/ignore) are ignored and .gitignore files inside directories are followed.

Dynamically find a string inside files

fzfx full

Note: Supports regular expressions.

Change directory

fzfx cd

To change dir with ENTER create an alias:

alias fcd='cd "$(fzfx cd)"'

Note: Needed because a child shell can't act on its parent.

If you don't know how aliases work, try using this configuration as an example.

Note: Aliases must be put or be sourced in .profile or RC files like .bashrc so to work persistently.

Copy any file to current dir

fzfx cp

Move any file to any dir

fzfx mv

Manage processes

fzfx ps

Find files with special cases

# markdown notes
fzfx md

# pdf, ps and eps
fzfx pdf

# pictures
fzfx pic

# audio and videos
fzfx av

Setup

Arch Linux

Install through the AUR.

From source

sudo make install             # installs under /usr/local
sudo make PREFIX=/usr install # mirror the system package layout

Remove it with sudo make uninstall (pass the same PREFIX).

Configure

Copy the bundled example and edit it:

cp /usr/share/fzfx/config.example "${XDG_CONFIG_HOME:-$HOME/.config}/fzfx/config"
  • Set searchPath to override the global search path.
  • Set searchLocal=true to always search locally.
  • Set editor to override the editor used by fzfx.
  • Set clipboard to override the clipboard command (auto-detected: wl-copy, xclip or pbcopy).
  • Set ignoreFile to override the default ignore file (.gitignore style).
  • Set defaultPreview, pdfView, avView, picView to whatever you prefer.

Note: All configurations are optional.

Contributing

Enable the bundled git hooks (runs shellcheck on commit):

make install-hooks

About

fzfX delivers the power of finding, previewing, editing and managing any file in few key strokes.

Topics

Resources

Stars

89 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages