diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-10-04 11:37:21 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-10-04 11:37:21 +0200 |
commit | d12ee3bfa78699eab8f03d9b0d06ed2a9547ab37 (patch) | |
tree | 8a016c62cc0d3b4c18ccc00fa057eab02f4251e0 | |
parent | f72c9d076057729d98f12235c00482710d166cf8 (diff) |
enable bash completion
-rw-r--r-- | app/Main.hs | 2 | ||||
-rw-r--r-- | default.nix | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/Main.hs b/app/Main.hs index 87951b6..2e36d4c 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -98,7 +98,7 @@ showCommandParser :: O.Parser Command showCommandParser = Show <$> filesArg filesArg :: O.Parser [String] -filesArg = O.many (O.strArgument (O.metavar "FILE")) +filesArg = O.many (O.strArgument (O.metavar "FILE" <> O.action "file")) main :: IO () main = do diff --git a/default.nix b/default.nix index 722d91c..1708430 100644 --- a/default.nix +++ b/default.nix @@ -7,7 +7,13 @@ let haskellPackages = pkgs.haskellPackages.override { overrides = self: super: { - anissue = super.callCabal2nix "anissue" ./. {}; + anissue = (super.callCabal2nix "anissue" ./. { }).overrideAttrs (oldAttrs: { + postInstall = '' + exe=${oldAttrs.pname} + mkdir -p $out/share/bash-completion/completions + $out/bin/$exe --bash-completion-script $exe >$out/share/bash-completion/completions/$exe + ''; + }); }; }; |