zsh-users
 help / color / mirror / code / Atom feed
* Forgetting about compinit with manual alteration of _comps
@ 2016-02-09 10:28 Sebastian Gniazdowski
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Gniazdowski @ 2016-02-09 10:28 UTC (permalink / raw)
  To: Zsh Users

Hello,
one calls compinit in .zshrc and then loads something that adds to
$fpath having intention of providing a completion. User is puzzled as
completion doesn't work, has to take care of having compinit placed at
say bottom of .zshrc.

Turns out the loading could be followed by:

    autoload -Uz _mycmd
    _comps[mycmd]=_mycmd

and that sets things working, mycmd is correctly completed. This works
for trivial #compdefs, don't know what side effects can non-trivial
#compdefs have.

The bottom line is: a software package providing trivial completions
can do autoload/_comps alteration to make users happy. If they called
compinit before – completions will work. If they call compinit after –
completions will work also. Any nastiness in this?

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <CAKc7PVBLufmR3wLZ8mVGpGq1o1DgB8ci3bH3X6cyzbMyEOoZZg__29303.1625486494$1455013779$gmane$org@mail.gmail.com>]

end of thread, other threads:[~2016-02-10 11:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 10:28 Forgetting about compinit with manual alteration of _comps Sebastian Gniazdowski
     [not found] <CAKc7PVBLufmR3wLZ8mVGpGq1o1DgB8ci3bH3X6cyzbMyEOoZZg__29303.1625486494$1455013779$gmane$org@mail.gmail.com>
2016-02-10  9:23 ` Daniel Shahaf
2016-02-10 10:28   ` Sebastian Gniazdowski
2016-02-10 10:32     ` Mikael Magnusson
2016-02-10 11:02       ` Sebastian Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).