add git log parsing into nu config

This commit is contained in:
Schrottkatze 2023-11-20 17:29:43 +01:00
parent 166835b305
commit d365273653

View file

@ -790,7 +790,20 @@ def nsp [
def lcr [ def lcr [
file_extension: string 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; alias gnix = cd ~/nix-configs;