Files
nixpkgs/pkgs/by-name/in/installShellFiles/tests/install-completion-name.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
686 B
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
installShellFiles,
runCommandLocal,
}:
runCommandLocal "install-shell-files--install-completion-name"
{
nativeBuildInputs = [ installShellFiles ];
meta.platforms = lib.platforms.all;
}
''
echo foo > foo
echo bar > bar
echo baz > baz
echo bucks > bucks
installShellCompletion \
--bash --name foobar.bash foo \
--zsh --name _foobar bar \
--fish baz \
--nushell --name foobar.nu bucks
cmp foo $out/share/bash-completion/completions/foobar.bash
cmp bar $out/share/zsh/site-functions/_foobar
cmp baz $out/share/fish/vendor_completions.d/baz
cmp bucks $out/share/nushell/vendor/autoload/foobar.nu
''