git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC 2/2] completion: allow use without compiling

From
Stephen Boyd <bebarino@gmail.com>
Date
Oct 27, 2009, 02:49 UTC
Message-ID
<4AE65FB5.3000905@gmail.com>
In-Reply-To
<7vocntd7vt.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 5 quoted lines
>
> 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?

Wouldn't relying on "git-completion.bash" to produce the pre-compiled form cause problems if someone is running the build on a bash-less system? I thought this issue was already raised by Shawn.

I guess we could ignore that issue now, and just say that you have to build the pre-compiled form on systems with bash?

Show 13 quoted lines
>
> 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.

I assume you're suggesting this to ease the upgrade path for users. It works nicely, we could just install the generated lists in the same path (contrib/completion/) and then users would be free to copy the two files anywhere as long as they're in the same directory. The only downside I see is there's now two files, but that's ok with me.

Previous: Clemens BuchacherNext: Shawn O. Pearce
Message 8 of 12 in “pre-generated completion fix and RFC”
  1. 0/2 pre-generated completion fix and RFCStephen Boyd, Oct 26, 2009
  2. 1/2 completion: ignore custom merge strategies when pre-generatingStephen Boyd, Oct 26, 2009
  3. 2/2 completion: allow use without compilingStephen Boyd, Oct 26, 2009
  4. Junio C HamanoOct 26, 2009
  5. Clemens BuchacherOct 27, 2009
  6. Junio C HamanoOct 27, 2009
  7. Clemens BuchacherOct 28, 2009
  8. Stephen BoydOct 27, 2009
  9. Shawn O. PearceOct 27, 2009
  10. Stephen BoydOct 28, 2009
  11. Junio C HamanoOct 28, 2009
  12. Stephen BoydOct 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.