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

Re: PATCH: completion cleanup



On Nov 3,  9:04am, Sven Wischnowsky wrote:
} Subject: Re: PATCH: completion cleanup
}
} [...] after adding the `funcstack' parameter, I made the parameter
} module be loaded in `compinit' because I wanted to make sure that this 
} parameter is always correct (if the module is loaded when there are
} already functions currently being executed, these functions will be
} missing from `funcstack').
} 
} So, Felix Rosencrantz wrote:
} 
} > Once I got a good build, I found that the compinit function fails
} > because it calls "zmodload -i parameter".  Zsh reports "bad option:-i".
} 
} Ouch, hadn't thought of that.

Simple workaround appended.

} I think the static linked version of `zmodload' should be quiet (and
} do nothing) if the module we attempt to load is linked in and should
} barf otherwise.

I agree ... and that relates back to my previous comment, that it ought
to be possible to have modules that are linked in but not yet "loaded".
That's going to require some serious thought.

Index: Completion/Core/compinit
===================================================================
@@ -115,7 +115,7 @@
 
 # Loading it now ensures that the `funcstack' parameter is always correct.
 
-zmodload -i parameter
+: $funcstack
 
 # This function is used to register or delete completion functions. For
 # registering completion functions, it is invoked with the name of the

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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