Bug 1513913 - zsh completion script installed as function
Summary: zsh completion script installed as function
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: fzf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-16 09:32 UTC by Christian Kellner
Modified: 2023-08-12 17:15 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github junegunn fzf pull 1156 0 'None' closed Functionalize zsh completion script. 2020-10-29 12:27:55 UTC

Description Christian Kellner 2017-11-16 09:32:11 UTC
First of all, thanks a lot for packaging zsh, much appreciated.

I am a bit puzzled how to properly load the zsh completion though. You are installing the completion file into as "fzf into "/usr/share/zsh/site-functions/" as if it would contain the definition of a "fzf" function (AFAIK in zsh, all files in the fpath define a function corresponding to the name of the file). But I am think the completion.zsh file is not meant to be a function and used that way. Maybe I am missing something (I am not a huge zsh-script guru) but I think the "completion.zsh" is a "normal" zsh script, meant to be executed just once on startup (see the fzf installation script https://github.com/junegunn/fzf/blob/master/install). With the current setup, doing "autoload -U fzf" and then trying to use it will just not work.
Long story short, I think completion.zsh should just be installed into "/usr/share/fzf/shell" and then should be sourced from there.

Comment 1 Elliott Sales de Andrade 2017-11-22 07:59:35 UTC
Sorry about that; I don't really use zsh. I think I may have figured out a way to get this working out-of-the-box which I'm discussing with upstream right now.

Comment 2 Fedora End Of Life 2018-02-20 15:37:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 3 Michal Halenka 2019-01-11 12:36:32 UTC
I confirm this bug on 'Fedora release 29 (Twenty Nine)'

Comment 4 Ben Cotton 2019-05-02 19:17:49 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2019-05-02 20:03:11 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Gabriele 2019-09-27 11:40:15 UTC
Hi, I am not filling a new bug because I think this refer to the same problem I have:

Installing fzf from Fedora (30) official repository, I see that in the completion feature is not working. After some tests I find out that the "completion.zsh" script is not listed in the appropriate folder "/usr/share/fzf/shell" in which there is the key-binding scripts. In fact, key bindings feature is working well.

To be sure the problem is this, I downloaded from github official repository the "completion.zsh" script, and just after copying it in "/usr/share/fzf/shell", the completion feature started working. So I think something is messed up in the package distributed from Fedora.

Thank you.

Some more infos:
I'm using Fedora 30, and zsh with oh-my-zsh (with the fzf plugin enabled).

Comment 7 tsroeirl 2019-12-06 20:11:51 UTC
The problem @Gabriele talks about persists with Fedora 31.

The completion.zsh is included by the fzf plugin of zsh, which looks into /usr/share/fzf/shell.

A `mv /usr/share/zsh/site-functions/fzf /usr/share/fzf/shell/completion.zsh` inside the package structure should do it.

Comment 8 Brian Thompson 2021-10-08 12:42:04 UTC
I can confirm the problem still exists in Fedora 34, and the above fix by @tsroeirl works.


Note You need to log in before you can comment on or make changes to this bug.