Skip to content

Commit 1eee4a4

Browse files
Sort filenames alphabetically when using the restore command
1 parent e3faab5 commit 1eee4a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install/usr/local/bin/restore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fi
7878
get_filename() {
7979
COLUMNS=12
8080
prompt="Please select a file to restore:"
81-
options=( $(find "${DB_DUMP_TARGET}" -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | xargs -0) )
81+
options=( $(find "${DB_DUMP_TARGET}" -type f -maxdepth 1 -not -name '*.md5' -not -name '*.sha1' -print0 | sort -z | xargs -0) )
8282
PS3="$prompt "
8383
select opt in "${options[@]}" "Custom" "Quit" ; do
8484
if (( REPLY == 2 + ${#options[@]} )) ; then

0 commit comments

Comments
 (0)