1

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 ?

PersianGulf
  • 10,728
  • 8
  • 51
  • 78
Martin Vegter
  • 69
  • 66
  • 195
  • 326

1 Answers1

1

Add it to your .bashrc :

if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi
HalosGhost
  • 4,732
  • 10
  • 33
  • 41
PersianGulf
  • 10,728
  • 8
  • 51
  • 78