fzf wrapper script for fish-shell.
Using Fisher:
fisher install takashabe/fish-fzfUse fzf with:
- ghq
- git switch branch based on GitHub pull request
- git-wt switching
- git-wt checkout from GitHub pull request
- history
- z
- files(use ripgrep)
- k8s context
- gcloud configurations
- cd (directory)
Type the function name on the shell.
fzf_ghqOr 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-o
endadvanced 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
endType these bound keys you can use the function. You can change the key binding to anything.