summary refs log tree commit diff stats
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.config/zsh/.zshrc11
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%"