]> Sergey Matveev's repositories - dotfiles.git/blobdiff - zsh/.zshrc
More fzf/path-extractor convenience
[dotfiles.git] / zsh / .zshrc
index e5f02abe87c2c2666e9ab84a04dc6b6b09c38874..b1baea7bc1d29331c45195ce068a9f89d1cb6ce0 100644 (file)
@@ -210,5 +210,17 @@ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=cyan"
 # }}}
 
 # fzf {{{
+alias -g PE="| pe"
+
+export FZF_DEFAULT_OPTS="--color=16 --info=inline --preview='less -N -S {}'"
+
+_fzf_find() {
+    find . \( -path "*/\.git" -o -fstype devfs -o -fstype procfs \) -prune \
+        -o -type d -print $@ 2>/dev/null | cut -b3-
+}
+
+export FZF_CTRL_T_COMMAND="_fzf_find -o -type f -print -o -type l -print"
+export FZF_ALT_C_COMMAND=_fzf_find
+
 . ~/work/fzf/shell/key-bindings.zsh
 # }}}