mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 14:05:41 +02:00
32 lines
664 B
Bash
Executable File
32 lines
664 B
Bash
Executable File
#!/bin/sh
|
|
|
|
search_dir="${1:-.}"
|
|
preview='bat --style=header,numbers --color=always {}'
|
|
|
|
fd_command="fd . \
|
|
--type file \
|
|
--hidden \
|
|
--follow \
|
|
--color always \
|
|
--exclude .git \
|
|
--exclude .github \
|
|
--exclude *.o \
|
|
--exclude *.pyc \
|
|
--full-path \"$search_dir\""
|
|
|
|
fzf_command="fzf \
|
|
--ansi \
|
|
--height=100% \
|
|
--keep-right \
|
|
--layout=reverse \
|
|
--scheme=path \
|
|
--multi \
|
|
--preview=\"[[ -n {1} ]] && $preview\" \
|
|
--preview-window='bottom,60%,border-top' \
|
|
--scrollbar='▐' --info=hidden \
|
|
--margin=5%,10%,5%,10% --border=none \
|
|
--prompt=' ' --pointer=' ' --ellipsis='' "
|
|
|
|
eval "$fd_command" | eval "$fzf_command"
|
|
exit 0
|