From 1a5ad4bc42f558b26aacf56e7604a7740c454f2b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 1 Dec 2018 02:21:27 +1300 Subject: Use array+=() syntax in two Bash completion files Since these only load with Bash >=4.0, we may as well use the nicer method of adding to arrays. --- bash/bash_completion.d/find.bash | 2 +- bash/bash_completion.d/pass.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bash/bash_completion.d/find.bash b/bash/bash_completion.d/find.bash index 007a83bd..85cadfaf 100644 --- a/bash/bash_completion.d/find.bash +++ b/bash/bash_completion.d/find.bash @@ -30,7 +30,7 @@ _find() { local item while read -r item ; do [[ -n $item ]] || continue - COMPREPLY[${#COMPREPLY[@]}]=$item + COMPREPLY+=("$item") done < <( # If the word being completed starts with a dash, just complete it as diff --git a/bash/bash_completion.d/pass.bash b/bash/bash_completion.d/pass.bash index 4a814412..1df8dfb1 100644 --- a/bash/bash_completion.d/pass.bash +++ b/bash/bash_completion.d/pass.bash @@ -16,7 +16,7 @@ _pass() local entry while IFS= read -rd '' entry ; do [[ -n $entry ]] || continue - COMPREPLY[${#COMPREPLY[@]}]=$entry + COMPREPLY+=("$entry") done < <( # Set shell options to expand globs the way we expect -- cgit v1.2.3