Skip to content

lfromanini/fz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fz

fz - Pipe commands to FZF

    ffffffffffffffff                   
  f::::::::::::::::f                  
 f::::::::::::::::::f                 
 f::::::fffffff:::::f                 
 f:::::f       ffffffzzzzzzzzzzzzzzzzz
 f:::::f             z:::::::::::::::z
f:::::::ffffff       z::::::::::::::z 
f::::::::::::f       zzzzzzzz::::::z  
f::::::::::::f             z::::::z   
f:::::::ffffff            z::::::z    
 f:::::f                 z::::::z     
 f:::::f                z::::::z      
f:::::::f              z::::::zzzzzzzz
f:::::::f             z::::::::::::::z
f:::::::f            z:::::::::::::::z
fffffffff            zzzzzzzzzzzzzzzzz

Description

fz is a simple Bash script to pipe commands to FZF so you can benefit from features like previewing and filtering.

Usage

Run fz followed by a valid command. Type fz --help to see the available commands.

Installation

  1. Download the script:

Download the file named fz and make it executable.

# download fz to current folder
curl -O https://raw.githubusercontent.com/lfromanini/fz/main/bin/fz

# make it executable
chmod +x fz
  1. Move it to a place in ${PATH}:

Choose a location from ${PATH}.

# check ${PATH}
tr ":" "\n" <<< "${PATH}" | sort --unique

Move the script to the choosen folder, for example:

mv fz ~/bin/

Make sure to use sudo if moving to a system folder.

sudo mv fz /usr/local/bin/
  1. Add completions to .bashrc and .zshrc

Add completion so you can type fz <TAB><TAB> or fz kill <TAB><TAB> to autocomplete:

# bash
echo 'source <( fz --bash-completion )' >> ~/.bashrc

# zsh
echo 'source <( fz --zsh-completion )' >> ~/.zshrc

Restart your shell for the changes to take effect.

  1. Done!

Requirements

LICENSE

The MIT License (MIT)

About

Pipe commands to FZF

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages