From 374ba596ab91760629c082e1fe3a0c8939577a48 Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 4 Mar 2026 08:25:21 +0100 Subject: [PATCH] fix: spacing --- flake.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 259f282..93017e4 100644 --- a/flake.nix +++ b/flake.nix @@ -96,7 +96,7 @@ }; toolNameWidth = builtins.foldl' ( - maxWidth: t: builtins.max maxWidth (builtins.stringLength t.name) + maxWidth: t: pkgs.lib.max maxWidth (builtins.stringLength t.name) ) 0 tools; toolLabelWidth = toolNameWidth + 1; @@ -107,7 +107,8 @@ in '' if command -v ${t.bin} >/dev/null 2>&1; then - printf " $CYAN %-${toString toolLabelWidth}s$RESET ${colorVar}%s$RESET\n" "${t.name}:" "$(${t.bin} ${t.versionCmd})" + version="$(${t.bin} ${t.versionCmd} 2>/dev/null | head -n 1 | sed -E 's/^[[:space:]]+//; s/[[:space:]]+$//')" + printf " $CYAN %-${toString toolLabelWidth}s$RESET ${colorVar}%s$RESET\n" "${t.name}:" "$version" fi '' ) tools;