]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Shorter notation
authorSergey Matveev <stargrave@stargrave.org>
Sun, 23 Mar 2025 16:26:45 +0000 (19:26 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 23 Mar 2025 16:26:45 +0000 (19:26 +0300)
bin/bin/zsnap

index 8ffb0e04cc28e68b6c4a09db787426e81e98dc48..3ee5afa88f92cc3986a985fe3c776703ed91809a 100755 (executable)
@@ -64,7 +64,7 @@ case $action in
         latest_dst=($dst/*.from~$dst/.*(.Onn[1]))
         [[ $latest_dst ]]
         latest_dst=${latest_dst[1]}
-        latest_dst=${${latest_dst##*/}%.from}
+        latest_dst=$latest_dst:t:r
         [[ $latest_dst != $latest_filename ]]
         setopt PIPE_FAIL
         set -x