diff options
author | Alan Pearce | 2018-06-16 16:17:13 +0200 |
---|---|---|
committer | Alan Pearce | 2018-06-16 16:17:13 +0200 |
commit | 92dd640461b7d2cbc5e4e7beacd19783ee43f55c (patch) | |
tree | 8fb07b6ef3142b4a6fd7b4648a0f136fc28fe082 | |
parent | f2640eb84768f7130c5d78a4070d121da11dd555 (diff) | |
download | nixfiles-92dd640461b7d2cbc5e4e7beacd19783ee43f55c.tar.lz nixfiles-92dd640461b7d2cbc5e4e7beacd19783ee43f55c.tar.zst nixfiles-92dd640461b7d2cbc5e4e7beacd19783ee43f55c.zip |
zsh: customise fzf/anyframe
-rw-r--r-- | zsh/.config/zsh/.zshrc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index ac2a0345..c40f73f4 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -213,13 +213,16 @@ fi if [[ -n $commands[fzf] ]] then - fp () { - ghq look $(ghq list | fzf +m) - } - zplugin snippet "https://github.com/junegunn/fzf/raw/master/shell/key-bindings.zsh" + export FZF_CTRL_T_COMMAND=' + (git ls-tree -r --name-only HEAD || + fd --hidden --follow --exclude ".git" . | + sed s/^..//) 2> /dev/null' + export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude ".git" .' + export FZF_DEFAULT_COMMAND=$FZF_CTRL_T_COMMAND bindkey '^t' transpose-chars + bindkey '^x^f' fzf-file-widget zstyle ":anyframe:selector:fzf:" command "fzf --height 40%" |