.bashrc
changeset 239 8f3d4826aec2
parent 237 ff30a2d60ee6
child 240 62bea4f80160
--- a/.bashrc	Tue Oct 25 22:19:01 2011 +0300
+++ b/.bashrc	Wed Oct 26 00:47:17 2011 +0300
@@ -203,15 +203,15 @@
 complete -b builtin
 
 _hgsyncew() {
-  local cur=${COMP_WORDS[$COMP_CWORD]}
+  local cur=${COMP_WORDS[COMP_CWORD]}
   COMPREPLY=( $(compgen -W "--push" -- $cur) )
   return 0
 }
 complete -F _hgsyncew -o nospace hgsyncew
 
 _pathsearch() {
-  local prev cur=${COMP_WORDS[$COMP_CWORD]}
-  [[ $COMP_CWORD > 0 ]] && prev=${COMP_WORDS[(($COMP_CWORD-1))]}
+  local prev cur=${COMP_WORDS[COMP_CWORD]}
+  [[ $COMP_CWORD > 0 ]] && prev=${COMP_WORDS[COMP_CWORD-1]}
   if [[ $prev = -d ]]; then
     COMPREPLY=()
     return 0