From 92dd640461b7d2cbc5e4e7beacd19783ee43f55c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 16 Jun 2018 16:17:13 +0200 Subject: zsh: customise fzf/anyframe --- zsh/.config/zsh/.zshrc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'zsh') diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index ac2a034..c40f73f 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%" -- cgit 1.4.1