]> Sergey Matveev's repositories - dotfiles.git/blobdiff - zsh/.zshrc
More fzf/path-extractor convenience
[dotfiles.git] / zsh / .zshrc
index 99f9b0841063581d820143e65e65f86e60bf742f..b1baea7bc1d29331c45195ce068a9f89d1cb6ce0 100644 (file)
@@ -208,3 +208,19 @@ ZSH_HIGHLIGHT_STYLES[path_pathseparator]="fg=white,bold,underline"
 . ~/work/zsh-autosuggestions/zsh-autosuggestions.zsh
 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
+# }}}