From 5d3f7ef58fd925b777bf722c31681c224cb46a28 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 9 May 2024 23:40:30 +0100 Subject: [PATCH] Override `just` command If a `.ignored/justfile` exists, e.g. for open-source projects I can't commit a `justfile` to, use it by default. --- lib/shared/modules/zsh.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/shared/modules/zsh.nix b/lib/shared/modules/zsh.nix index 3f134196..ea002ea9 100644 --- a/lib/shared/modules/zsh.nix +++ b/lib/shared/modules/zsh.nix @@ -58,6 +58,14 @@ t "''${repo_path}" } + just() { + if [[ -f .ignored/justfile ]]; then + ${pkgs.just}/bin/just --justfile .ignored/justfile "''${@}" + else + ${pkgs.just}/bin/just "''${@}" + fi + } + ttyper() { command ${pkgs.ttyper}/bin/ttyper --language english1000 --words 50 "''${@}" }