That's a correct diagnosis of the problem but not quite the right fix. Many X 
terminals are a bit buggy and do not always launch bash in the correct mode 
(login shell versus non login shell).

The best way to fix it is, put all shell RC configuration into the .bashrc 
which executes in all the shells, with anything you want to occur in all shells 
toward the top, and then a directive which checks if PS1 is defined, before 
running anything that should happen only in a login shell. Then, from .profile 
or .bash_profile, put in something which executes .bashrc.

Some of the logic for executing bashrc from profile does exist in skel already 
on most Debian and Ubuntu machines, but the special stuff for PS1 doesn't, 
because only a few people need this part.

Matthew.
-- 
Sent from my mobile device.

Pierpaolo Franco <pierpaolo.fra...@gmail.com> wrote:
>bash completion (i.e. man or hg commands) seems not working for user in
>gnome-terminal. Pretty standard Debian 7 configuration.
>
>$ cat ~/.bashrc
>setterm -blength 0
>
>It works as expected in VTs either as root or as normal user...
>
>SOLVED:
># enable bash completion in interactive shells
>if [ -f /etc/bash_completion ]; then
>    . /etc/bash_completion
>fi
>
>in .bashrc
>
>Maybe documenting the trick or put it on skel?
>
>thanks
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Bash-completion-devel mailing list
>Bash-completion-devel@lists.alioth.debian.org
>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel
_______________________________________________
Bash-completion-devel mailing list
Bash-completion-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel

Reply via email to