Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Completion collision, best way to fix



Hi,

I am working on a completion function for the freebsd new package
manager, actually it is working:
https://github.com/pkgng/pkgng/blob/master/scripts/zsh/_pkg

I want to add the completion function to the main zsh git but I face
the problems:
The right place for it would be Completion/BSD/Command, but if I put
it there it will hide the Completion/Solaris/Command/_pkg5 has they
both define #compdef pkg

Is there a nice way to deal with this situation?

Merging both functions into one and pushed into unix, and condition
the completion base on the OSTYPE?

or is there some kind of #compdef_only_on_solaris pkg
#compdef_only_on_freebsd pkg thing available ?

regards,
Bapt



Messages sorted by: Reverse Date, Date, Thread, Author