[Bash-completion-devel] user's gnome-terminal [solved]

Matthew Hall mhall at mhcomputing.net
Sun Jan 19 02:13:50 UTC 2014


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.franco at 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 at lists.alioth.debian.org
>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20140118/9f74becc/attachment.html>


More information about the Bash-completion-devel mailing list