summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorHendrik Jäger <gitcommit@henk.geekmail.org>2022-12-03 23:17:43 +0100
committerHendrik Jäger <gitcommit@henk.geekmail.org>2022-12-03 23:17:43 +0100
commitdab9e4d849c12589209c9d896c4f4ba2a2cae8ee (patch)
tree75bce7b8c77b98b0df7f7425b7903dde98d7f090 /.zshrc
parent05507588f3cb1c7e263475d8a140342f5b63bc86 (diff)
add fzf basics
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc17
1 files changed, 17 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index e1226da..e04c8ea 100644
--- a/.zshrc
+++ b/.zshrc
@@ -15,6 +15,8 @@ export ANSIBLE_STRATEGY=mitogen_linear
export TEXMFCNF=${HOME}/.texlive:
+export FZF_DEFAULT_COMMAND='fdfind --type f'
+
# what is that for exactly? maybe taskwarrior? or timewarrior?
REPORTTIME=10
@@ -274,6 +276,21 @@ zgenom load 'https://github.com/nojhan/liquidprompt'
# see https://github.com/zsh-users/zsh-syntax-highlighting
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+source /usr/share/doc/fzf/examples/key-bindings.zsh
+source /usr/share/doc/fzf/examples/completion.zsh
+
+# Use fd (https://github.com/sharkdp/fd) instead of the default find
+# command for listing path candidates.
+# - The first argument to the function ($1) is the base path to start traversal
+# - See the source code (completion.{bash,zsh}) for the details.
+_fzf_compgen_path() {
+ fdfind --hidden --follow --exclude ".git" . "$1"
+}
+
+# Use fd to generate the list for directory completion
+_fzf_compgen_dir() {
+ fdfind --type d --hidden --follow --exclude ".git" . "$1"
+}
# commands to run after initialization is complete
#task awaiting