From e02e6c262056a06fc4b76054352e52511a2d8e57 Mon Sep 17 00:00:00 2001 From: xesc Date: Fri, 26 Jul 2024 23:11:06 +0200 Subject: [PATCH] add support for fd-find for faster searching --- tmux-sessionizer | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tmux-sessionizer b/tmux-sessionizer index e2048f6..ed6e1e8 100755 --- a/tmux-sessionizer +++ b/tmux-sessionizer @@ -1,7 +1,12 @@ #!/usr/bin/bash HOMEDIR=~ -SEL_DIR=$(find ~ -not -path "*/.*" -type d -print 2>/dev/null | fzf) +which fd > /dev/null +if [ 0 = $? ]; then + SEL_DIR=$(fd --type directory | fzf) # if fd-find is installed +else + SEL_DIR=$(find ~ -not -path "*/.*" -type d -print 2>/dev/null | fzf) +fi SEL_NAME=$(basename "$SEL_DIR") new_session_name(){