diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-09-28 16:45:47 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-09-28 16:49:39 +0200 |
commit | 3592e5b055ad0fcd70d1ae9e4804a4b5c6a77c5d (patch) | |
tree | 18700c6bca9a3815fbc588cab18f3afd8362673d /anissue.nix | |
parent | 1f9282020f19a3e9826d976e639cf9f9700db331 (diff) |
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/
Diffstat (limited to 'anissue.nix')
-rw-r--r-- | anissue.nix | 5 |
1 files changed, 4 insertions, 1 deletions
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 ''; } |