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.
11 lines
166 B
Nix
11 lines
166 B
Nix
{ pkgs }:
|
|
|
|
pkgs.writeShellApplication {
|
|
name = "drafts";
|
|
|
|
runtimeInputs = with pkgs; [ gnugrep ];
|
|
|
|
text = ''
|
|
grep -r 'draft: true' "''${1:-source}"
|
|
'';
|
|
}
|