# HG changeset patch # User Oleksandr Gavenko # Date 1380805537 -10800 # Node ID cbe5958b4d6cd489dca7a1cfd5d7fa78d9897a6d # Parent 5be69ec2aa5955b5c259f0c227b50d46471bdb3f Add trailing slash to directory in "cd" completion. diff -r 5be69ec2aa59 -r cbe5958b4d6c .bash_completion --- a/.bash_completion Tue Sep 17 12:57:48 2013 +0300 +++ b/.bash_completion Thu Oct 03 16:05:37 2013 +0300 @@ -60,13 +60,14 @@ cur=${COMP_WORDS[COMP_CWORD]} if [[ -z "${CDPATH:-}" ]] || [[ $cur == ?(.)?(.)/* ]] || [[ $cur == '~'/* ]]; then COMPREPLY=( $(compgen -d -- "$cur") ) + COMPREPLY=${COMPREPLY[@]/%//} 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[k++]=${j#$i/}/ done done return 0