aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/zshfzf
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2024-09-01 17:23:35 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2024-09-01 17:23:35 -0400
commite0d79e6c570d02f353039a0057f0e8036b6e6511 (patch)
tree81c1ceae3d3e48a48f2166ce1a1a708d008b9b3d /zsh/zshfzf
parentc9658790bd19de81abc5f2f5565ec66f6099e5b6 (diff)
feat: zsh file browser + previewer
Diffstat (limited to 'zsh/zshfzf')
-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