-
-
Save codegenerator-cz/c11328c7e17af2ffa9266695582f1d3c to your computer and use it in GitHub Desktop.
The fuzzy file explorer powered by fzf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A simple script to make fzf a fuzzy-file explorer | |
cur_folder=$(pwd) | |
while true | |
do | |
folder=$( ( echo -e '.\n..'; fd -t d --color=always ) \ | |
| fzf --no-height --preview-window=right:50% \ | |
--preview 'tree -L 2 -C {}') | |
test $? -ne 0 && break | |
cur_folder="$cur_folder/$folder" | |
cd "$cur_folder" | |
done | |
echo "$cur_folder" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment