Stephen Boyd <bebarino@xxxxxxxxx> writes: > Some users don't want to compile their completion, even when the build > generated completion is 10x faster to load. For example, in my bashrc I > source the completion script directly so I can stay up to date with the > latest completion by merely pulling changes. > > Do this by generating the lists dynamically when the merge strategy and > command lists still have their initial values (__GIT_MERGE_STRATEGYLIST, > __GIT_ALL_COMMANDLIST). > > Signed-off-by: Stephen Boyd <bebarino@xxxxxxxxx> > --- > > This duplicates code, but I don't know of a way to re-use the dynamic > code without sourcing a bash script and possibly breaking someone's build. If we are going to do this, wouldn't it make more sense to revert the rename of the script, so that people can keep relying on the name of the script being "git-completion.bash", _but_ make it produce a pre-compiled form to a separate file when invoked in some particular way? Then at the runtime: (0) If the script notices that it has already learned the command list it uses it; otherwise, (1) If the script notices that there is a file that contains the command list, it sources it; otherwise, (2) The script lazily builds the command list for its own use. And at the buildtime, Makefile can run the script in "generation mode", and install the output to where (1) above expects to see. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html