# HG changeset patch
# User Oleksandr Gavenko <gavenkoa@gmail.com>
# Date 1350930308 -10800
# Node ID 50e17493c476dc94ed88ba78629adffa7a706f71
# Parent  3d5ba8711141b97a0ae1a453bc5d8d1adfb47699
Fix condition syntax and add special case of '~/' path.

diff -r 3d5ba8711141 -r 50e17493c476 .bash_completion
--- a/.bash_completion	Mon Oct 22 21:00:36 2012 +0300
+++ b/.bash_completion	Mon Oct 22 21:25:08 2012 +0300
@@ -58,7 +58,7 @@
 _mycd() {
   local cur
   cur=${COMP_WORDS[COMP_CWORD]}
-  if [[ -z "${CDPATH:-}" || "$cur" == ?(.)?(.)/* ]]; then
+  if [[ -z "${CDPATH:-}" ]] || [[ $cur == ?(.)?(.)/* ]] || [[ $cur == '~'/* ]]; then
     COMPREPLY=( $(compgen -d -- "$cur") )
     return 0
   fi