Unverified Commit f2544dc8 authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

mdcat: add mdless symlink and install completions

Closes #215459
parent c2ef271d
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -42,10 +42,14 @@ rustPlatform.buildRustPackage rec {

  postInstall = ''
    installManPage $releaseDir/build/mdcat-*/out/mdcat.1
    ln -sr $out/bin/{mdcat,mdless}

    for bin in mdcat mdless; do
      installShellCompletion \
      --bash $releaseDir/build/mdcat-*/out/completions/mdcat.bash \
      --fish $releaseDir/build/mdcat-*/out/completions/mdcat.fish \
      --zsh $releaseDir/build/mdcat-*/out/completions/_mdcat
        --bash $releaseDir/build/mdcat-*/out/completions/$bin.bash \
        --fish $releaseDir/build/mdcat-*/out/completions/$bin.fish \
        --zsh $releaseDir/build/mdcat-*/out/completions/_$bin
    done
  '';

  meta = with lib; {