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

Re: [PATCH] meson: install shell completion scripts

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 9, 2025, 17:42 UTC
Message-ID
<xmqq4iyxs02r.fsf@gitster.g>
In-Reply-To
<Z_SJSKrUdiWzg4pw@teonanacatl.net>
Todd Zullinger <tmz@pobox.com> writes:
Show 18 quoted lines
>> Most people won't run into this since if you have this installed in the
>> standard locations, it should just work, and the zsh script does have
>> logic to look for additional paths it may be under. I just wanted to
>> mention it for info.
>
> I wonder whether it is proper to install the completion
> scripts relative to git's $datadir by default.
>
> I think the default ought to use the pkg-config call to get
> the completionsdir variable, as the zsh completion script
> suggests.  I am presuming that's something meson can do
> rather trivially, just as it would do to find the compile
> options for git's various build dependencies?
>
> I don't know if that becomes too messy to be worthwhile when
> determining whether git is being installed by a normal user
> in $HOME or by a privileged user in a system-wide prefix
> like /usr.

Yes, exactly. We left it out of what Makefile does for that exact reason. Distros will do what is best for their environment, and I do not think, unlike pkg-config used to figure out distro specific locations when doing a system-wide install, there is a location that will make everybody happy in the context of per-user installation.

If we were to install these completion script from make or meson, I suspect that we'd eventually need a separate make variable or meson configuration item (whose default value can come from $datadir unless there is a better setting that already exists in our system) that is only used to specify the location completion script.

Thanks.
Previous: Todd ZullingerNext: Eli Schwartz
Message 4 of 8 in “meson: install shell completion scripts”
  1. meson: install shell completion scriptsPatrick Steinhardt, Apr 7, 2025
  2. Akshay HegdeApr 8, 2025
  3. Todd ZullingerApr 8, 2025
  4. Junio C HamanoApr 9, 2025
  5. Eli SchwartzApr 17, 2025
  6. Junio C HamanoApr 17, 2025
  7. Patrick SteinhardtApr 22, 2025
  8. contrib/completion: install Bash completionPatrick Steinhardt, Apr 22, 2025

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.