Sort camera images by mtime

This commit is contained in:
Konstantin Nazarov 2024-11-23 18:31:37 +00:00
parent 0ebd7c228c
commit bee2b54c31
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22

2
q-cam
View file

@ -9,7 +9,7 @@ elif [[ "$1" == "--hint" ]]; then
elif [[ "$1" == "--complete" ]]; then elif [[ "$1" == "--complete" ]]; then
shift shift
if [[ -d "$CAMERA_DIR" ]]; then 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 fi
elif [[ "$1" == "--preview" ]]; then elif [[ "$1" == "--preview" ]]; then
shift shift