Here's the latest result of trying to make a
BASH prompt which might be useful if
you use chroot
, ssh
, su
or
git
:
Example session (if the above is in ~/.bashrc or /etc/bash.bashrc on both
hosts):
my_user@local_hostname:~$ cd git-repos/project/
my_user@local_hostname:~git-repos/project (master)$ sudo -u other_user bash
other_user@local_hostname:~git-repos/project (master)$ ssh third_user@other_hostname
third_user@other_hostname:~$ exit
other_user@local_hostname:~/Desktop/images$ exit
my_user@local_hostname:~/Desktop/images$