Use compound assignment to array instead of manual index updating.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 03 Oct 2013 16:13:00 +0300
changeset 638 19faaf3d9d32
parent 637 cbe5958b4d6c
child 639 bef22a7d822b
Use compound assignment to array instead of manual index updating.
.bash_completion
--- a/.bash_completion	Thu Oct 03 16:05:37 2013 +0300
+++ b/.bash_completion	Thu Oct 03 16:13:00 2013 +0300
@@ -64,10 +64,9 @@
     return 0
   fi
   local i j k
-  k=0
   for i in ${CDPATH//:/$'\n'}; do
     for j in $( compgen -d -- $i/$cur ); do
-      COMPREPLY[k++]=${j#$i/}/
+      COMPREPLY+=(${j#$i/}/)
     done
   done
   return 0