Unverified Commit f180937a authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #325480 from SFrijters/ov-completions

ov: fix shell completions
parents 9cf9d3ce 6ece1873
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
{ 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"