diff options
author | Brian Mattern <rephorm@rephorm.com> | 2012-09-21 14:40:43 -0700 |
---|---|---|
committer | Brian Mattern <rephorm@rephorm.com> | 2012-09-21 14:40:43 -0700 |
commit | b947ef162265060fc79933403968f0fa8d37e214 (patch) | |
tree | 8875915f0c1d48f281e846bf23544f271ea8a4e8 | |
parent | c2d28accf5c79c7929a90506061c70ffa70cca86 (diff) | |
download | pass-b947ef162265060fc79933403968f0fa8d37e214.tar.gz pass-b947ef162265060fc79933403968f0fa8d37e214.tar.bz2 pass-b947ef162265060fc79933403968f0fa8d37e214.zip |
Append to COMPREPLY instead of inserting by index
Diffstat (limited to '')
-rw-r--r-- | contrib/pass.bash-completion | 4 |
1 files changed, 1 insertions, 3 deletions
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 } |