I start dtach from bash using the following command
dtach -c /tmp/dt0 bash
the problem is, before I started dtach, bash_completion worked. But once I start dtach, bash_completion does not work anymore.
I have to manually source the bash completion file
. /usr/share/bash-completion/bash_completion
this line is /etc/profile.d/bash_completion.sh, but for some reason dtach does not source it properly.
Is there any way to make dtach use bash completion automatically ?