asfaltboy / fish-fzf

fzf select functions for fish shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fish-fzf

fzf wrapper script for fish-shell.

Install

Using Fisherman:

fisher takashabe/fish-fzf

Feature

Use fzf with:

Usage

Type the function name on the shell.

fzf_ghq

Or you can easily use it by adding key binding to config.fish:

function fish_user_key_bindings
  bind \c] fzf_ghq      # Ctrl-]
  bind \cr fzf_history  # Ctrl-r
  bind \cj fzf_z        # Ctrl-j
  bind \co fzf_file     # Ctrl-f
end

advanced usage:

function wrap_fzf_history
  history-merge
  fzf_history
end

function wrap_fzf_file
  fzf_file --preview "bat --style=numbers --color=always --line-range :500 {}"
end

function fish_user_key_bindings
  bind \cr wrap_fzf_history
  bind \co wrap_fzf_file
end

Type these bound keys you can use the function. You can change the key binding to anything.

About

fzf select functions for fish shell

License:MIT License


Languages

Language:Shell 100.0%