vis: fzf.sh when on fd switches between fd and find

This commit is contained in:
2025-10-06 07:45:18 +02:00
parent bcd7480efc
commit 297d2959fa

View File

@@ -28,6 +28,9 @@ if [ "$1" = list ]; then
files+hidden) files+hidden)
exec fd --type f -H '' $dir exec fd --type f -H '' $dir
;; ;;
find-files*)
exec find $dir -type f
;;
search) search)
exec $ripgrep "$FZF_QUERY" $dir exec $ripgrep "$FZF_QUERY" $dir
;; ;;
@@ -116,6 +119,9 @@ if [ "$1" = key ]; then
;; ;;
alt-f) alt-f)
case "$cmd" in case "$cmd" in
files)
prompt="find-files$hidden"
;;
*files|search) *files|search)
prompt="files$hidden" prompt="files$hidden"
;; ;;
@@ -220,7 +226,7 @@ auto-search)
action="$no_search" action="$no_search"
prompt="$cmd> " prompt="$cmd> "
;; ;;
files|git-files|jj-files) files|git-files|jj-files|find-files)
cmd="$1" cmd="$1"
action="$search" action="$search"
prompt="$1> " prompt="$1> "