Merge pull request #325480 from SFrijters/ov-completions

ov: fix shell completions
This commit is contained in:
Weijia Wang
2024-07-08 15:42:10 +02:00
committed by GitHub
+6 -5
View File
@@ -1,4 +1,5 @@
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
@@ -38,12 +39,12 @@ buildGoModule rec {
outputs = [ "out" "doc" ];
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd ov \
--bash <($out/bin/ov completion bash) \
--fish <($out/bin/ov completion fish) \
--zsh <($out/bin/ov completion zsh)
--bash <($out/bin/ov --completion bash) \
--fish <($out/bin/ov --completion fish) \
--zsh <($out/bin/ov --completion zsh)
'' + ''
mkdir -p $out/share/$name
cp $src/ov-less.yaml $out/share/$name/less-config.yaml
makeWrapper $out/bin/ov $out/bin/ov-less --add-flags "--config $out/share/$name/less-config.yaml"