Skip to content

Commit

Permalink
[overlays/poetry] fix completions
Browse files Browse the repository at this point in the history
Temporary fix for python-poetry/poetry#5929.
  • Loading branch information
bfogarty committed Sep 8, 2023
1 parent 11373a6 commit b98d8c3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions overlays/poetry.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
self: super: {
# python-poetry/poetry#5929
poetry = super.poetry.overrideAttrs (old: {
postInstall = let
# 'xyz'' => "xyz"'
match = "'([^']+)''";
replace = "\"$1\"'";
in ''
installShellCompletion --cmd poetry \
--bash <($out/bin/poetry completions bash) \
--zsh <($out/bin/poetry completions zsh) \
--fish <($out/bin/poetry completions fish | ${super.sd}/bin/sd "${match}" "${replace}")
'';
});
}

0 comments on commit b98d8c3

Please sign in to comment.