mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
Revert "installShellFiles: add emulator doc for installShellCompletion"
This reverts commit 149a6e0a91
.
See discussion in https://github.com/NixOS/nixpkgs/issues/308283 for
more details on why this isn't something we want to suggest.
This commit is contained in:
parent
496fcd4aee
commit
2cf25e711c
1 changed files with 7 additions and 12 deletions
|
@ -99,17 +99,12 @@ failure. To prevent this, guard the completion generation commands.
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
nativeBuildInputs = [ installShellFiles ];
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||||
let
|
# using named fd
|
||||||
emulator = stdenv.hostPlatform.emulator buildPackages;
|
installShellCompletion --cmd foobar \
|
||||||
in
|
--bash <($out/bin/foobar --bash-completion) \
|
||||||
''
|
--fish <($out/bin/foobar --fish-completion) \
|
||||||
# using named fd
|
--zsh <($out/bin/foobar --zsh-completion)
|
||||||
installShellCompletion --cmd foobar \
|
'';
|
||||||
--bash <(${emulator} $out/bin/foobar --bash-completion) \
|
|
||||||
--fish <(${emulator} $out/bin/foobar --fish-completion) \
|
|
||||||
--zsh <(${emulator} $out/bin/foobar --zsh-completion)
|
|
||||||
''
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue