From 7b9cad9947fccb02555433a36c42a1d30d266027 Mon Sep 17 00:00:00 2001 From: Federico Zambelli Date: Mon, 23 Sep 2024 16:02:12 +0200 Subject: [PATCH] chore: add cmd to pretty print scripts and descriptions --- devenv.nix | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/devenv.nix b/devenv.nix index f779ae6..cfc8fbd 100644 --- a/devenv.nix +++ b/devenv.nix @@ -45,14 +45,34 @@ in # convenient shortcuts scripts.up.exec = "devenv up -d"; - scripts.up.description = "Start processes defined in devenv.nix in the background."; + scripts.up.description = "Start processes in the background."; scripts.down.exec = "devenv processes down"; - scripts.down.description = "Stop processes defined in devenv.nix in the background."; + scripts.down.description = "Stop processes."; scripts.tests.exec = "pytest && rm -rf ./tmp"; scripts.tests.description = "Run pytest and cleanup."; + scripts.show.exec = '' + GREEN="\033[0;32m"; + YELLOW="\033[33m"; + NC="\033[0m"; + echo + echo -e "✨ Helper scripts you can run to make your development richer:" + echo + + ${pkgs.gnused}/bin/sed -e 's| |••|g' -e 's|=| |' <