[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#63860] [PATCH v2] Add Bash completion file.
From: |
Oleg Pykhalov |
Subject: |
[bug#63860] [PATCH v2] Add Bash completion file. |
Date: |
Sat, 03 Jun 2023 22:28:23 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
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.
signature.asc
Description: PGP signature