.bash_completion
changeset 317 f171e09537bd
parent 283 eb383cf7ba80
child 318 68363fe03ae4
equal deleted inserted replaced
314:d1a4574fa534 317:f171e09537bd
    60   if [[ -z "${CDPATH:-}" || "$cur" == ?(.)?(.)/* ]]; then
    60   if [[ -z "${CDPATH:-}" || "$cur" == ?(.)?(.)/* ]]; then
    61     COMPREPLY=( $(compgen -d -- "$cur") )
    61     COMPREPLY=( $(compgen -d -- "$cur") )
    62     return 0
    62     return 0
    63   fi
    63   fi
    64   local i j k
    64   local i j k
       
    65   k=0
    65   for i in ${CDPATH//:/$'\n'}; do
    66   for i in ${CDPATH//:/$'\n'}; do
    66     k="${#COMPREPLY[@]}"
       
    67     for j in $( compgen -d -- $i/$cur ); do
    67     for j in $( compgen -d -- $i/$cur ); do
    68       COMPREPLY[k++]=${j#$i/}
    68       COMPREPLY[k++]=${j#$i/}
    69     done
    69     done
    70   done
    70   done
    71   return 0
    71   return 0