Created
March 3, 2022 19:54
-
-
Save dylan-sessler/b361822205761175ca9a22e1a8c6bb99 to your computer and use it in GitHub Desktop.
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
get-backup-filepath() { | |
PS3='Pick a file to revert from: ' | |
select fname in $(head -n 10 <(ls $BACKUP_SAVE_LOCATION --sort=time)) | |
do | |
if [[ $fname = "" ]]; then | |
echo $REPLY is not a valid option | |
else | |
echo "${BACKUP_SAVE_LOCATION}$fname" | |
break | |
fi | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment