Mark variable as local to avoid overwriting global values.
--- a/.bashrc Fri Oct 28 09:29:37 2011 +0300
+++ b/.bashrc Sat Oct 29 17:31:06 2011 +0300
@@ -222,6 +222,7 @@
COMPREPLY=( $(compgen -d -- "$cur") )
return 0
fi
+ local i j k
for i in ${CDPATH//:/$'\n'}; do
k="${#COMPREPLY[@]}"
for j in $( compgen -d $i/$cur ); do
@@ -244,7 +245,7 @@
complete -F _man man
_make() {
- local mk
+ local i mk
local cur=${COMP_WORDS[COMP_CWORD]}
[[ $COMP_CWORD > 0 ]] && prev=${COMP_WORDS[COMP_CWORD-1]}
if [[ $prev = -f ]]; then