gentoo / gentoo-zsh-completions

[ORIGIN] Gentoo specific zsh completion support (ebuild, emerge, eselect, ...)
Other
36 stars 19 forks source link

added zsh plugin support file #8

Closed Triquetra closed 6 years ago

Triquetra commented 8 years ago

for use with zsh plugin managers like zplug and zgen

radhermit commented 8 years ago

Just to note, I'm not familiar with zplug but one of quoted features is "Unlike antigen, no ZSH plugin file (*.plugin.zsh) required."

Also imho, this is sort of what live ebuilds are for (as gentoo-zsh-completions is mostly pointless on a non-gentoo system), but I guess I sort of understand if you have setup with a bunch of external plugins and want everything in one place.

Triquetra commented 8 years ago

Yes, I originally had this installed via portage, but I've started using dotbot, and together with zplug, they allow me to have a simple (single command), cross machine and cross distro configuration install process. Having this installed via zplug eliminates the need for the extra manual emerge step. As for the lack of need for a plugin file with zplug, that has turned out not to be entirely accurate. What the author of zplug really meant was that the plugin file need not conform to the antigen plugin requirements (though it will use that if available). In this case, since these completions lacked ANY install file, zplug couldn't handle it. The author graciously worked with me to create a workaround in zplug that would permit use of these completions without the plugin file, but that is neither as clean nor robust as simply having the plugin file. Besides, users of other plugin managers, like antigen or zgen, may find this useful as well.

msva commented 8 years ago

cross distro And what Tim mentions, is that completions here are useless on non-gentoo systems. And it is portage on gentoo ones.

// And if you've something gentoo-comp related in your zshrc, then you can simply check for gentoo comps availability to avoid loading gentoo-related things on non-gentoo.

// and, by the way, I myself is very dislike any "monsters" (plugin engines) for zsh, since they all are slowdown zsh very well.

Triquetra commented 8 years ago

But what your missing is that using portage requires an extra MANUAL step in the installation process, and if the completions are to be used as a flag then it must be emerged (and I must remember to do so) prior to all other config install. A much better method (which is what I'm using) is to let the installation process determine whether it's a gentoo system (e.g. [[ -n $(grep Gentoo /etc/*-release) ]]), and then automagically install the gentoo completions (and other gentoo related things) if needed.

msva commented 8 years ago

Actually, I don't think it is a big problem, since you're anyway installing zsh, and all you need is to have "zsh-completions" USE-flag enabled in make.conf. And you'll have both app-shells/zsh-completions and app-shells/gentoo-zsh-completions installed on your system by nearest emerge -uDN @world.

NigoroJr commented 8 years ago

I agree with @msva. I contribute to the zplug project quite often, but I think this is something that the plugin manager should "compromise" (not even, because it's just telling zplug where to look at. 6 characters to type) rather than this project having to account for the plugin managers and putting a seemingly unrelated .zsh file at the top level directory. Additionally, version 2 of zplug is looking to support specifying that a plugin is a set of completions.

I can see the argument about antigen and zgen users, but then again, they can simply add zsh-completions to the make.conf as @msva mentioned (which subjectively is a better solution because you can install completions for all the other packages).

radhermit commented 6 years ago

I'm closing this since none of the arguments to support such a method have convinced me it's necessary atm.