Last active
August 29, 2015 14:26
-
-
Save Soft/489c89bac15f8bc57044 to your computer and use it in GitHub Desktop.
Handy file browser using tmenu
This file contains hidden or 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
function browse { | |
local selection=$(ls -a | tmenu -l $(tput lines)) | |
if [[ -d "$selection" && "$selection" != "." ]]; then | |
cd "$selection" | |
browse "$(pwd)" | |
elif [[ -f "$selection" ]]; then | |
xdg-open "$selection" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment