dmidecode-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] bash: add completions


From: Ville Skyttä
Subject: Re: [PATCH] bash: add completions
Date: Mon, 18 Sep 2023 22:29:58 +0300

On Mon, 18 Sept 2023 at 15:56, Jean Delvare <jdelvare@suse.de> wrote:

> Hi Ville,
>
> On Sat, 22 Jul 2023 22:55:31 +0300, Ville Skyttä wrote:
> > Offer only long options, but recognize short ones, too, per rationale at
> >
> https://github.com/scop/bash-completion/blob/4d0bffb791c34c96114aeb2e4f6726b80aa8698e/CONTRIBUTING.md?plain=1#L136-L153
> >
> > Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
> > ---
> >  Makefile        | 14 ++++++--
> >  biosdecode.bash | 40 +++++++++++++++++++++
> >  dmidecode.bash  | 95 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  ownership.bash  | 33 +++++++++++++++++
> >  vpddecode.bash  | 45 +++++++++++++++++++++++
>
> Please create a directory for completion files, the root directory of
> the project is already cluttered enough as is.
>

Done.

I'm attaching the revised changeset as a single patch attachment here, hope
that's ok (my git/send-email-fu isn't up to dealing with followups
properly). This new one includes also scraping of --string and --type
values as discussed in another message.

> +compdir = $(shell pkg-config --variable=completionsdir bash-completion
> 2>/dev/null || echo $(prefix)/etc/bash_completion.d)
>
> This is going to potentially install files outside of $(prefix) by
> default, which is questionable.
>

True. Then again if the prefix or lookup dirs of bash-completion are
actually different from our $(prefix), installing in our $(prefix) will
cause the completions to not be found. I think this is the best we can do.


> > -install : install-bin install-man install-doc
> > +install : install-bin install-man install-doc install-completion
>
> I'm worried about this being enabled by default while the system may not
> even have bash installed. Can we enable this by default only if
> $(compdir) exists? This directory would typically be owned by the bash
> package.
>

I guess that'd work, done.

Ville

Attachment: 0001-bash-add-completions.patch
Description: Source code patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]