From 06f5ca98018fd4ba357b0e70b1e710b682b6cdb5 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 14 Dec 2015 17:48:52 +1300 Subject: Switch to a faster method of array appending Does away with the nasty hack around man page discovery, and still compatible with Bash 2.05a --- bash/bashrc.d/gpg.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash/bashrc.d/gpg.bash') diff --git a/bash/bashrc.d/gpg.bash b/bash/bashrc.d/gpg.bash index cea4a7cb..c2340520 100644 --- a/bash/bashrc.d/gpg.bash +++ b/bash/bashrc.d/gpg.bash @@ -25,7 +25,7 @@ _gpg() { local option while read -r option ; do [[ $option == "${COMP_WORDS[COMP_CWORD]}"* ]] || continue - COMPREPLY=("${COMPREPLY[@]}" "$option") + COMPREPLY[${#COMPREPLY[@]}]=$option done < <(gpg --dump-options 2>/dev/null) } complete -F _gpg -o default gpg -- cgit v1.2.3