Commit 2cf25e71 authored by awwpotato's avatar awwpotato Committed by Winter
Browse files

Revert "installShellFiles: add emulator doc for installShellCompletion"

This reverts commit 149a6e0a.

See discussion in https://github.com/NixOS/nixpkgs/issues/308283 for
more details on why this isn't something we want to suggest.
parent 496fcd4a
Loading
Loading
Loading
Loading
+7 −12
Original line number Diff line number Diff line
@@ -99,17 +99,12 @@ failure. To prevent this, guard the completion generation commands.
```nix
{
  nativeBuildInputs = [ installShellFiles ];
  postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
    let
      emulator = stdenv.hostPlatform.emulator buildPackages;
    in
    ''
  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    # using named fd
    installShellCompletion --cmd foobar \
        --bash <(${emulator} $out/bin/foobar --bash-completion) \
        --fish <(${emulator} $out/bin/foobar --fish-completion) \
        --zsh <(${emulator} $out/bin/foobar --zsh-completion)
    ''
  );
      --bash <($out/bin/foobar --bash-completion) \
      --fish <($out/bin/foobar --fish-completion) \
      --zsh <($out/bin/foobar --zsh-completion)
  '';
}
```