mdcat: add mdless symlink and install completions

Closes #215459
This commit is contained in:
Sandro Jäckel 2023-02-17 14:05:18 +01:00
parent c2ef271dee
commit f2544dc85f
No known key found for this signature in database
GPG key ID: B1763F8651144063

View file

@ -42,10 +42,14 @@ rustPlatform.buildRustPackage rec {
postInstall = ''
installManPage $releaseDir/build/mdcat-*/out/mdcat.1
installShellCompletion \
--bash $releaseDir/build/mdcat-*/out/completions/mdcat.bash \
--fish $releaseDir/build/mdcat-*/out/completions/mdcat.fish \
--zsh $releaseDir/build/mdcat-*/out/completions/_mdcat
ln -sr $out/bin/{mdcat,mdless}
for bin in mdcat mdless; do
installShellCompletion \
--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; {