Mark variable as local to avoid overwriting global values.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 29 Oct 2011 17:31:06 +0300
changeset 253 70b18b0b9e53
parent 252 2fa0c2abe304
child 254 8963bce11ed5
Mark variable as local to avoid overwriting global values.
.bashrc
--- 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