From d365273653585ec32db12019e5a287da4c009df6 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Mon, 20 Nov 2023 17:29:43 +0100 Subject: [PATCH] add git log parsing into nu config --- other/config.nu | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/other/config.nu b/other/config.nu index 2f37444..4785398 100644 --- a/other/config.nu +++ b/other/config.nu @@ -790,7 +790,20 @@ def nsp [ def lcr [ file_extension: string ] { - ls $"**/*.($file_extension)" | each {|file| open $file.name | lines --skip-empty | length} | math sum + ls $"**/*.($file_extension)" + | each {|file| + open $file.name + | lines --skip-empty + | length } + | math sum +} + +def glog [ + amount: int +] { + git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n $amount + | lines + | split column "»¦«" commit subject name email date } alias gnix = cd ~/nix-configs;