Re: meson: Installing completions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Akshay Hegde wrote:
> On 2025-04-01 11:58 +0200, Patrick Steinhardt wrote:
>>The biggest question though is whether distros are aligned enough for us
>>to provide standard installation paths. That is, do all distros end up
>>installing bash completion into "/usr/share/bash-completion"? What are
>>the desired directories for tcsh and zsh completion?
>>
>>If there is enough standardization then yes, I totally think we should
>>start installing completion scripts automatically.
> 
> Well I can't speak from any sort of authoritativeness here, but for zsh,
> they are usually installed underneath the datadir (usually /usr/share),
> then under zsh/site-functions. Of course, I don't know if that's true
> for all distros.
> 
> Could we extend meson_options to allow specification of bash/tcsh/zsh
> completion directories? If they are not empty, I think it would be
> reasonable to have meson install it automatically.

Having the ability to specify the install path seems like
the way to go, even if the default is used by most systems.
For Fedora, only the bash and tcsh completions are
installed.  The latter is simply placed in:

    /usr/share/git-core/contrib/completion/git-completion.tcsh

and users need to make some adjustments to their startup
scripts to use it, as documented in the file.  This was
added to the Fedora packages in:

    commit dae8588
    Author: Todd Zullinger <tmz@xxxxxxxxx>
    Date:   Thu Jan 3 14:59:27 2013 -0500

        For now, this just gets the file from contrib installed.  If there are
        enough tcsh users that want it to be more automated, that can come
        later.  For now, the directions in the file must be followed to enable
        tcsh completion.

In the years I maintained git in Fedora, no one asked for
any changes for tcsh.  Apparently, either no one uses that
or they don't mind the manual work to configure it. :)

IIRC, there are git completions installed by upstream zsh
and installing git-completion.zsh site-wide is not generally
agreed that everyone wants?  I'm not a zsh user, but I think
that's why I never installed it in the Fedora git packaging.
(It does seem like an oversight that they aren't at least
installed similarly to the tcsh completion.)

For reference, here are the locations for bash, fish, and
zsh which Fedora uses.  This might be helpful in determining
reasonable defaults (after comparing to other distributions,
of course):

    bash /usr/share/bash-completion/completions
    fish /usr/share/fish/vendor_completions.d
    zsh  /usr/share/zsh/site-functions

-- 
Todd




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux