From a3c77b42fb977a4a5499fcced67febc130bae81c Mon Sep 17 00:00:00 2001 From: b12f Date: Wed, 14 Aug 2024 09:38:05 +0200 Subject: [PATCH] terminal-life: use the user name instead of fullname for git --- modules/terminal-life/.config/git/config.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/terminal-life/.config/git/config.nix b/modules/terminal-life/.config/git/config.nix index dc50bd8..13c12c6 100644 --- a/modules/terminal-life/.config/git/config.nix +++ b/modules/terminal-life/.config/git/config.nix @@ -12,8 +12,8 @@ in '' [user] else "" } ${ - if user.fullName != null - then "name = ${user.fullName}" + if user.name != null + then "name = ${user.name}" else "" } ${ @@ -27,7 +27,19 @@ in '' [user] [alias] pol = pull ack = -c color.grep.linenumber=\"bold yellow\"\n -c color.grep.filename=\"bold green\"\n -c color.grep.match=\"reverse yellow\"\n grep --break --heading --line-number - # define command which will be used when "nvim"is set as a merge tool + lg = "!f() { \ + git log --all --color --graph --pretty=format:'%C(bold yellow)%G?%C(reset) %C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)' | \ + sed \ + -e 's#G#Good#' \ + -e 's#B#\\nBAD \\nBAD \\nBAD \\nBAD \\nBAD#' \ + -e 's#U#Unknown#' \ + -e 's#X#Expired#' \ + -e 's#Y#Expired Key#' \ + -e 's#R#Revoked#' \ + -e 's#E#Missing Key#' \ + -e 's#N#None#' | \ + less -r; \ + }; f" [mergetool] prompt = false