From 3592e5b055ad0fcd70d1ae9e4804a4b5c6a77c5d Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 28 Sep 2023 16:45:47 +0200 Subject: add list, show commands The `list` command can be omitted and is the default. The `show` command retains past output. ```console $ anissue -h Usage: anissue anissue list anissue show ``` The implementation uses docopts, the shell variant of docopt [1]. Because of that, wrapping with `--argv0 ''` is necessary when packaging. [1] http://docopt.org/ --- anissue.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'anissue.nix') diff --git a/anissue.nix b/anissue.nix index e0c3496..c2113f0 100644 --- a/anissue.nix +++ b/anissue.nix @@ -1,4 +1,5 @@ { coreutils +, docopts , fetchFromGitHub , findutils , gawk @@ -23,8 +24,10 @@ stdenv.mkDerivation { for bin in src/*.sh; do cp $bin $out/share/$(basename $bin) wrapProgram $out/share/$(basename $bin) \ + --argv0 ''' \ --set PATH ${lib.makeBinPath [ coreutils + docopts findutils gawk git @@ -35,6 +38,6 @@ stdenv.mkDerivation { tree-grepper ]} done - ln -s $out/share/extract.sh $out/bin/anissue + ln -s $out/share/anissue.sh $out/bin/anissue ''; } -- cgit v1.2.3