[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/23: bash completion: Append to $COMPREPLY where possible.
From: |
guix-commits |
Subject: |
03/23: bash completion: Append to $COMPREPLY where possible. |
Date: |
Sun, 3 Oct 2021 13:28:18 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 17f76b209ceca9972dcd375d2a0f869abc6d1f26
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Oct 3 14:02:04 2021 +0200
bash completion: Append to $COMPREPLY where possible.
_guix_complete is always called with a fresh empty array.
* etc/completion/bash/guix (_guix_complete_command)
(_guix_complete_subcommand, _guix_complete_installed_package)
(_guix_complete_option, _guix_complete_pid): Append to $COMPREPLY rather
than re-assigning.
---
etc/completion/bash/guix | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 112ea78..ea8f76f 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -32,7 +32,7 @@ _guix_complete_command ()
| grep '^ ' \
| sed '-es/^ *\([a-z-]\+\).*$/\1/g')"
fi
- COMPREPLY=($(compgen -W "$_guix_commands" -- "$word_at_point"))
+ COMPREPLY+=($(compgen -W "$_guix_commands" -- "$word_at_point"))
}
_guix_complete_subcommand ()
@@ -41,7 +41,7 @@ _guix_complete_subcommand ()
local subcommands="$(${COMP_WORDS[0]} $command --help 2> /dev/null \
| grep '^ [a-z]' \
| sed -e's/^ \+\([a-z-]\+\).*$/\1/g')"
- COMPREPLY=($(compgen -W "$subcommands" -- "${COMP_WORDS[$COMP_CWORD]}"))
+ COMPREPLY+=($(compgen -W "$subcommands" -- "${COMP_WORDS[$COMP_CWORD]}"))
}
_guix_complete_available_package ()
@@ -54,7 +54,7 @@ _guix_complete_available_package ()
_guix_available_packages="$(${COMP_WORDS[0]} package -A 2> /dev/null \
| cut -f1)"
fi
- COMPREPLY=($(compgen -W "$_guix_available_packages" -- "$prefix"))
+ COMPREPLY+=($(compgen -W "$_guix_available_packages" -- "$prefix"))
}
_guix_complete_installed_package ()
@@ -64,7 +64,7 @@ _guix_complete_installed_package ()
local prefix="$1"
local packages="$(${COMP_WORDS[0]} package -I "^$prefix" 2> /dev/null \
| cut -f1)"
- COMPREPLY=($(compgen -W "$packages" -- "$prefix"))
+ COMPREPLY+=($(compgen -W "$packages" -- "$prefix"))
}
_guix_complete_option ()
@@ -79,7 +79,7 @@ _guix_complete_option ()
| grep '^ \+-' \
| sed
-e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g')"
compopt -o nospace
- COMPREPLY=($(compgen -W "$options" -- "$2"))
+ COMPREPLY+=($(compgen -W "$options" -- "$2"))
}
_guix_is_option ()
@@ -174,7 +174,7 @@ _guix_complete_file ()
_guix_complete_pid ()
{
local pids="$(cd /proc; echo [0-9]*)"
- COMPREPLY=($(compgen -W "$pids" -- "$1"))
+ COMPREPLY+=($(compgen -W "$pids" -- "$1"))
}
_guix_complete ()
- branch master updated (c98c9c5 -> 91389d4), guix-commits, 2021/10/03
- 04/23: bash completion: Complete ‘guix weather’ packages., guix-commits, 2021/10/03
- 05/23: bash completion: Complete ‘guix build’ file names., guix-commits, 2021/10/03
- 07/23: bash completion: Fix ‘system’ & ‘container’ subcommands., guix-commits, 2021/10/03
- 02/23: bash completion: Consolidate similar $command ‘if’ branches., guix-commits, 2021/10/03
- 03/23: bash completion: Append to $COMPREPLY where possible.,
guix-commits <=
- 08/23: gnu: os-prober: Update to 1.79., guix-commits, 2021/10/03
- 11/23: gnu: ccache: Update to 4.4.2., guix-commits, 2021/10/03
- 14/23: gnu: dnsmasq: Prepare for cross-compilation., guix-commits, 2021/10/03
- 15/23: gnu: sx: Update to 2.1.7., guix-commits, 2021/10/03
- 17/23: gnu: yadifa: Update to 2.5.1 [security fixes]., guix-commits, 2021/10/03
- 09/23: gnu: libhx: Update to 4.0.1., guix-commits, 2021/10/03
- 10/23: gnu: snapraid: Update to 11.6., guix-commits, 2021/10/03
- 13/23: gnu: dnsmasq: Update to 2.86., guix-commits, 2021/10/03
- 16/23: gnu: sx: Don't propagate xauth., guix-commits, 2021/10/03
- 18/23: gnu: corsix-th: Update to 0.65.1., guix-commits, 2021/10/03