FS#73485 - [pyenv] some shell completion broken

Attached to Project: Community Packages
Opened by Quint Guvernator (qguv) - Monday, 24 January 2022, 16:15 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:03 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

The shell completions in pyenv aren't currently working. I believe this is because they're not installed in a place that will get read by the shell. Lots more information at [1] including upstream PRs. I suspect the fix is to include a completion file like [2] or otherwise patch upstream so their script is installed correctly.

Additional info:

* package version(s): all pyenv, at least through 2.2.3-1
* config and/or log files etc: n/a
* link to upstream bug report:
* https://github.com/pyenv/pyenv/pull/1458
* https://github.com/pyenv/pyenv/pull/1644

Steps to reproduce:

* `pacman -S pyenv`
* add recommended lines to shell rc files
* open a shell and type `pyenv <TAB>`

[1]: https://bbs.archlinux.org/viewtopic.php?pid=1973466#p1973466
[2]: https://bbs.archlinux.org/viewtopic.php?pid=1957176#p1957176
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:03 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/pyenv/issues/1
Comment by David Runge (dvzrv) - Wednesday, 16 February 2022, 17:21 GMT
@qguv: Thanks for the report.

Please be more specific as to which shell integration is broken. There is bash, fish and zsh shell completion.

Please also provide a specific example as to how you would envision a fix to your problem.
Comment by Julian (jhossbach) - Tuesday, 19 April 2022, 19:04 GMT
  • Field changed: Percent Complete (100% → 0%)
Problem persists, upstream decided against patching this fix as it seems to be very specific so it depends on us to create a patch. I have a working patch which I can post in the comments as soon as this is reopened
Comment by Julian (jhossbach) - Wednesday, 20 April 2022, 08:54 GMT
zsh completion is broken when installing pyenv using pacman because of a broken completion script (see https://github.com/pyenv/pyenv/pull/1644). The maintainers of pyenv decided against patching the script as it breaks zsh completion when installing via cloning the repository. Instead, they explicitly leave the issue to be fixed by the maintainers of whatever OS packaging system wants to use it. In order to do that, we need to replace the contents of /usr/share/zsh/site-functions/_pyenv with something like the file I attached (credits to https://bbs.archlinux.org/viewtopic.php?pid=1957176#p1957176, but feel free to adapt)
   _pyenv (0.6 KiB)
Comment by Arvid Norlander (VorpalGun) - Wednesday, 22 June 2022, 15:49 GMT
I ran into this today too. I'm using zsh and it's completions are indeed broken.
Comment by Julio Batista Silva (jbsilva) - Friday, 13 January 2023, 17:53 GMT
Thanks, Julian.
Replacing /usr/share/zsh/site-functions/_pyenv solved for me.
Comment by Julian (jhossbach) - Tuesday, 13 June 2023, 21:14 GMT
@dvzrv: Any chance this can get added soon? Having to download this file every time pyenv is updated is becoming rather annoying.

Loading...