aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/vis.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bashrc.d/vis.bash')
-rw-r--r--bash/bashrc.d/vis.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/vis.bash b/bash/bashrc.d/vis.bash
index 02981afe..93b4098c 100644
--- a/bash/bashrc.d/vis.bash
+++ b/bash/bashrc.d/vis.bash
@@ -5,7 +5,7 @@ _vis() {
vispath=${VISPATH:-$HOME/.local/bin}
[[ -d $vispath ]] || return
while IFS= read -d '' -r executable ; do
- COMPREPLY=("${COMPREPLY[@]}" "$executable")
+ COMPREPLY[${#COMPREPLY[@]}]=$executable
done < <(
shopt -s dotglob nullglob
declare -a files
@@ -13,7 +13,7 @@ _vis() {
declare -a executables
for file in "${files[@]}" ; do
[[ -f $file && -x $file ]] || continue
- executables=("${executables[@]}" "${file##*/}")
+ executables[${#executables[@]}]=${file##*/}
done
((${#executables[@]})) || exit 1
printf '%q\0' "${executables[@]}"