~gpanders/dotfiles

ref: 1e3d13c0aa34c1d87b518c19c66edcc975f7944d dotfiles/.config/fish/conf.d/fzf.fish -rw-r--r-- 754 bytes
1e3d13c0Gregory Anders vim: add guards in vim-lsc configuration 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
if status is-interactive; and command -sq fzf
    if command -sq fd
        set fuzzy_find_file_command 'fd --type f --follow'
        set fuzzy_find_dir_command 'fd -t d'
    else if command -sq rg
        set fuzzy_find_file_command 'rg --files'
        set fuzzy_find_dir_command "find -L . -mindepth 1 -type d -print | sed 's|^\./||'"
    else if command -sq ag
        set fuzzy_find_file_command "ag -g ''"
        set fuzzy_find_dir_command "find -L . -mindepth 1 -type d -print | sed 's|^\./||'"
    end

    set -gx FZF_DEFAULT_COMMAND $fuzzy_find_file_command
    set -gx FZF_DEFAULT_OPTS "--height=10 --reverse --no-info --no-color --cycle"

    bind \ct '__fuzzy_find fzf'
    bind \cr '__fuzzy_history fzf'
    bind \ec '__fuzzy_cd fzf'
end