Add trailing slash to directory in "cd" 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