Summary: | app-shells/fzf-0.38.0: include completion scripts for bash and zsh | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Stefan <stefan> |
Component: | Current packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | jstein, sam, v |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
include completion scripts for bash and zsh
completion.patch |
Note that we already do: newbashcomp shell/completion.bash ${PN} [...] newins shell/completion.zsh _${PN} Are we not supposed to be doing that? (In reply to Sam James from comment #1) > Are we not supposed to be doing that? Hmmm. That's a very good question. It seems I completely missed those 2 lines. I'll have a look tomorrow. I was about ready to go to bed. OK. So yes, sourcing the installed _fzf file functions the same as sourcing the additional completion.zsh file installed using my patched ebuild. I'm not entirely sure about the following,; I'm pretty new to ZSH. Manually sourcing the file is needed because it is not actually an auto-loading completion script. It's missing the #compdef definition to trigger auto loading I had a look at the Arch wiki page for FZF. And it does mention the completion.zsf file, but by its original name. To be honest I'm not really how to proceed from here. [0]: https://wiki.archlinux.org/title/fzf completion.zsh should not be installed as _fzf files in /usr/share/zsh/site-functions that start with an underscore are needed to complete command arguments but fzf's completion.zsh does not provide fzf command completion, it provides other functionality more like a zsh "plugin" so i think for zsh it should be installed like Stefan done this in patch (In reply to dm9pZCAq from comment #4) > completion.zsh should not be installed as _fzf > > files in /usr/share/zsh/site-functions that start with an underscore are > needed to complete command arguments > > but fzf's completion.zsh does not provide fzf command completion, it > provides other functionality more like a zsh "plugin" > > so i think for zsh it should be installed like Stefan done this in patch Thanks. Is the current bash setup OK, so we just need to fix zsh? (In reply to Sam James from comment #5) > Is the current bash setup OK, so we just need to fix zsh? i think yes, as bash completion provides actual tab completion Fedora installs to /usr/share/zsh/site-functions/fzf (no _) which I suppose is what you were saying, I just wasn't sure because of your comment wrt Stefan's patch - but Stefan's patch had kept the _ part in. Created attachment 868956 [details, diff]
completion.patch
... so is this right?
(In reply to Sam James from comment #7) > Fedora installs to /usr/share/zsh/site-functions/fzf (no _) which I suppose > is what you were saying, I just wasn't sure because of your comment wrt > Stefan's patch - but Stefan's patch had kept the _ part in. as far as I understand, Stefan's patch installs shell/completion.zsh to /usr/share/fzf/completion.zsh and I think that's ok (there is also an app-misc/skim that does the same thing) on the other hand, app-shells/zsh-syntax-highlighting installs the "plugin" in /usr/share/zsh/site-functions/${PN}.zsh (note: there is a zsh extension) (In reply to Sam James from comment #8) > ... so is this right? personally, I prefer how this is done in the app-misc/skim for fzf it would be like this: /usr/share/fzf/completion.bash /usr/share/fzf/key-bindings.bash /usr/share/fzf/completion.zsh /usr/share/fzf/key-bindings.zsh |
Created attachment 857291 [details, diff] include completion scripts for bash and zsh fzf has scripts for bash ans zsh to enable fuzzy completion for a specific set of commands. The current ebuild does not install these scripts. I have attached the diff between the ebuild for 0.38.0 in portage and my local overlay.