aboutsummaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/zshfzf11
1 files changed, 11 insertions, 0 deletions
diff --git a/zsh/zshfzf b/zsh/zshfzf
new file mode 100644
index 0000000..ff6e061
--- /dev/null
+++ b/zsh/zshfzf
@@ -0,0 +1,11 @@
+source <(fzf --zsh)
+
+fzf_widget() {
+ BUFFER=$(fd | fzf --multi --scheme=path\
+ --preview 'preview {} $FZF_PREVIEW_LINES' --preview-label='File Preview')
+ CURSOR=$#BUFFER
+ zle redisplay
+}
+zle -N fzf_widget
+
+bindkey '^f' fzf_widget