From 0b1970ee4b23e1d38ebe757c3ae998b1653bf3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 13 May 2024 16:25:56 +0300 Subject: [PATCH] d: skip leading zeros --- shared/home/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/home/default.nix b/shared/home/default.nix index 4b787c5..f2e5b5b 100644 --- a/shared/home/default.nix +++ b/shared/home/default.nix @@ -240,7 +240,7 @@ in { }; initExtra = '' t() { git rev-parse --show-toplevel; } - d() { date --utc --date=@$(echo "$1" | sed -E 's/^[^0-9]*(.{10}).*/\1/') +"%F %T"; } + d() { date --utc --date=@$(echo "$1" | sed -E 's/^[^1-9]*([0-9]{10}).*/\1/') +"%F %T"; } source ${./gg.sh} ''; };