all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: 63860@debbugs.gnu.org
Subject: [bug#63860] [PATCH v2] Add Bash completion file.
Date: Sat, 03 Jun 2023 22:28:23 +0300	[thread overview]
Message-ID: <87sfb8ibvs.fsf@gmail.com> (raw)
In-Reply-To: <f39020814e1e5bd4a585491bf0ae757a0017ac00.camel@gmail.com> (Liliana Marie Prikler's message of "Sat, 03 Jun 2023 20:20:00 +0200")

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

[…]

>> +{
>> +    local command="${COMP_WORDS[1]}"
>> +    case "$command" in
>> +        discover)
>> +            complitions="guix-daemon"
>> +            mapfile -t COMPREPLY < <(compgen -W "$complitions" --
>> "${COMP_WORDS[$COMP_CWORD]}")
>> +            ;;
> Is there a reason to call the variable "complitions" rather than
> "completions"

No reason, it's a typo probably from autocompletion of my editor. :-)

> or using an immediate value?

Do you mean to use the following?
--8<---------------cut here---------------start------------->8---
    case "$command" in
        discover)
            mapfile -t COMPREPLY < <(compgen -W guix-daemon -- "${COMP_WORDS[$COMP_CWORD]}")
            ;;
    ...
--8<---------------cut here---------------end--------------->8---

yes, this will work.


No strong opinion on that, both ways would work for me.


Regards,
Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2023-06-03 19:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 22:19 [bug#63860] [PATCH] Shepherd: Add Bash completion file Oleg Pykhalov
2023-06-02 22:21 ` [bug#63860] [PATCH] " Oleg Pykhalov
2023-06-03  9:37 ` [bug#63860] [PATCH v2] " Oleg Pykhalov
2023-06-03  9:41   ` [bug#63860] [PATCH] Shepherd: " Oleg Pykhalov
2023-06-03 18:20   ` [bug#63860] [PATCH v2] " Liliana Marie Prikler
2023-06-03 19:28     ` Oleg Pykhalov [this message]
2023-06-03 21:42       ` Liliana Marie Prikler
2023-06-04  8:57         ` [bug#63860] [PATCH v3] " Oleg Pykhalov
2023-06-05 12:03           ` bug#63860: [PATCH] Shepherd: " Ludovic Courtès

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=87sfb8ibvs.fsf@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=63860@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

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.