From bee2b54c31ca2725677b0ee6bd2d4e2f4114a957 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Sat, 23 Nov 2024 18:31:37 +0000 Subject: [PATCH] Sort camera images by mtime --- q-cam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/q-cam b/q-cam index 816c87f..ec283b7 100755 --- a/q-cam +++ b/q-cam @@ -9,7 +9,7 @@ elif [[ "$1" == "--hint" ]]; then elif [[ "$1" == "--complete" ]]; then shift if [[ -d "$CAMERA_DIR" ]]; then - ls "$CAMERA_DIR" | awk '{print $1 " cam " $1}' + find ~/Camera -type f -not -path '*/\.*' -printf "%T@ %P\n" -type f | sort -n -r | cut -d " " -f 2 | awk '{print $1 " cam " $1}' fi elif [[ "$1" == "--preview" ]]; then shift