fzf wrapper script for fish-shell.
Using Fisherman:
fisher install takashabe/fish-fzf
Use fzf with:
- ghq
- git switch branch based on GitHub pull request
- history
- z
- files(use ripgrep)
- k8s context
- gcloud project
- cd (directory)
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.