From b947ef162265060fc79933403968f0fa8d37e214 Mon Sep 17 00:00:00 2001 From: Brian Mattern Date: Fri, 21 Sep 2012 14:40:43 -0700 Subject: Append to COMPREPLY instead of inserting by index --- contrib/pass.bash-completion | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'contrib') diff --git a/contrib/pass.bash-completion b/contrib/pass.bash-completion index 36c0cf2..bd7ed61 100644 --- a/contrib/pass.bash-completion +++ b/contrib/pass.bash-completion @@ -10,7 +10,6 @@ _pass_complete_entries () { autoexpand=${1:-0} local IFS=$'\n' - local i=0 for item in $(compgen -f $prefix$cur); do if [[ $item == $prefix.* ]]; then continue @@ -30,8 +29,7 @@ _pass_complete_entries () { fi done item="${item%$suffix}" - COMPREPLY[$i]=$(printf "%q" "${item#$prefix}" ) - (( i++ )) + COMPREPLY+=($(printf "%q" "${item#$prefix}" )) done } -- cgit v1.2.3-59-g8ed1b