query
On this page

generateOptparseApplicativeCompletions

pkgs.haskell.lib.generateOptparseApplicativeCompletions

Docs pulled from | This Revision | about 1 hour ago


Modify a Haskell package to add shell completion scripts for the given executables produced by it. These completion scripts will be picked up automatically if the resulting derivation is installed, e.g. by nix-env -i.

Invocation: generateOptparseApplicativeCompletions commands pkg

commands: name of an executable pkg: Haskell package that builds the executables


Noogle detected

Implementation

The following is the current implementation of this function.

generateOptparseApplicativeCompletions =
    commands: pkg:
    lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2211)
      "haskellLib.generateOptparseApplicativeCompletions is deprecated in favor of haskellPackages.generateOptparseApplicativeCompletions. Please change ${pkg.name} to use the latter and make sure it uses its matching haskell.packages set!"
      (pkgs.lib.foldr __generateOptparseApplicativeCompletion pkg commands);