From 06689e3fae30429101a18e5db51d4d5cdba9dac3 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 22 Aug 2025 12:25:04 +0100 Subject: [PATCH] Allow for filtering drafts by directory Allow for passing an argument to `drafts` which will be passed to `grep`. If no argument is passed, `source` will be used as the default value. --- drafts.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drafts.nix b/drafts.nix index 8e16be780..7ea35135f 100644 --- a/drafts.nix +++ b/drafts.nix @@ -6,6 +6,6 @@ pkgs.writeShellApplication { runtimeInputs = with pkgs; [ gnugrep ]; text = '' - grep -r 'draft: true' source + grep -r 'draft: true' "''${1:-source}" ''; }