Skip to content

SleepyBag/zle-fzf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

zle-fzf

Insert commands, file names and variable names fuzzily through fzf.

You can insert commands,

asciicast

file names,

asciicast

variable names,

asciicast

and recent directories if you have z or autojump installed.

asciicast

Installation

  • (Recommanded) Install with zplug
zplug "SleepyBag/zle-fzf"
  • Or manually:
  1. Clone this repo into an arbitrary path;
  2. source file zle-fzf.plugin.zsh in your .zshrc.

Other zsh plugin managers should work like zplug. If zle-fzf doesn't work well with your plugin manager, please feel free to open a new issue.

Dependencies

Optional

  • z (to list recent files, you don't need autojump if you have z)
  • autojump (to list recent files, you don't need z if you have autojump)

Usage

By default, the functions are binded as following:

binding function name description
M-x _fuzzy-insert-command insert a command (binary, built-in, functions and etc)
M-f _fuzzy-insert-filename find a file recursively and insert its name
M-d _fuzzy-insert-recent-dir select a recent directory and insert its name
M-v _fuzzy-insert-variable insert a variable name

where M- means that you should keep pressing Meta key, which is typically Alt, when press the following key.

Surely you are able to rebind these functions to other keys by bindkey:

bindkey '^[x' _fuzzy-insert-command
bindkey '^[f' _fuzzy-insert-filename
bindkey '^[v' _fuzzy-insert-variable
bindkey '^[d' _fuzzy-insert-recent-dir

About

Insert commands, file names and variable names fuzzily through fzf.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages