From: Junio C Hamano <gitster@pobox.com>
To: Eli Schwartz <eschwartz@gentoo.org>
Cc: Todd Zullinger <tmz@pobox.com>,
Akshay Hegde <lists+git@akshay.is>,
git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH] meson: install shell completion scripts
Date: Thu, 17 Apr 2025 07:31:55 -0700 [thread overview]
Message-ID: <xmqqzfgeeu5g.fsf@gitster.g> (raw)
In-Reply-To: <da10dd26-a7bb-474d-8c9a-cac32614d296@gentoo.org> (Eli Schwartz's message of "Wed, 16 Apr 2025 23:58:22 -0400")
Eli Schwartz <eschwartz@gentoo.org> writes:
> bash-completion looks for scripts in a few different places, with a
> common theme that there is a "datadir" followed by the literal path
> bash-completion/completions -- some values for the datadir:
> ...
> ... since as long as you leave meson
> datadir and bindir alone you can install into absolutely any prefix, no
> matter how weird, and successfully invoking `git` itself will as a side
> effect add the correct bash completion file.
>
> And that also means that distros automatically do the right thing --
> just configure with prefix=/usr and we get
> /usr/share/bash-completion/completions as expected
OK, so that is clear and easy. Next to where we have
infodir = $(prefix)/share/info
we add
bash_completion_dir = $(prefix)/share/bash-completion/completions
and everybody would be happy. We do the parallel on the meson side.
> With zsh, things are a lot shakier. ...
> ... (a lot of explanation on zsh installation path quirks omitted)
> So, my personal feelings on this patch are that we can and should
> unambiguously install the bash completion, but it would be reasonable to
> defer handling zsh until someone figures out how to do it correctly,
> which may be impossible.
Sounds good. Or just use
zsh_completion_dir = $(prefix)/share/zsh/site-functions
perhaps. Those who are making personal installation under $HOME at
least would know that what they have under $prefix mirrors the
/usr/{bin,lib,share,....}/ if things were installed for host, so
even though zsh does not look into there, at least the layout would
be familiar to the user. But I am even happier if we decide to
leave it out as you suggested.
Thanks.
next prev parent reply other threads:[~2025-04-17 14:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 7:42 [PATCH] meson: install shell completion scripts Patrick Steinhardt
2025-04-08 0:00 ` Akshay Hegde
2025-04-08 2:26 ` Todd Zullinger
2025-04-09 17:42 ` Junio C Hamano
2025-04-17 3:58 ` Eli Schwartz
2025-04-17 14:31 ` Junio C Hamano [this message]
2025-04-22 8:36 ` Patrick Steinhardt
2025-04-22 8:36 ` [PATCH v2] contrib/completion: install Bash completion Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqzfgeeu5g.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=eschwartz@gentoo.org \
--cc=git@vger.kernel.org \
--cc=lists+git@akshay.is \
--cc=ps@pks.im \
--cc=tmz@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.