Date: Tue, 4 Aug 1998 06:13:04 +0200 (CEST) From: Sascha Schumann <sas@schell.de> To: Studded <Studded@dal.net> Cc: William Woods <wwoods@cybcon.com>, "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG> Subject: Re: BASH prompt question Message-ID: <Pine.BSF.4.01.9808040601590.353-100000@guerilla.foo.bar> In-Reply-To: <35C6816E.58367535@dal.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 3 Aug 1998, Studded wrote:
> Sascha Schumann wrote:
> >
> > On Mon, 3 Aug 1998, Studded wrote:
> >
> > > Sascha Schumann wrote:
> > > >
> > > > On Sun, 2 Aug 1998, William Woods wrote:
> > > >
> > > > > I would like to make my bash prompt show a little more info, like what dir the
> > > > > user is in. How would I do this?
> > > >
> > > > Edit /etc/profile and insert at the end:
> > > >
> > > > test "$SHELL" = "/bin/bash" && test -e ~/.bashrc && source ~/.bashrc
> > >
> > > Why are you inserting a test to accomplish something that bash does by
> > > default?
> >
> > Because it's not default nor done automatically.
> >
> > I don't like to quote documents everybody has. But if people are too lazy
> > to look at it, I have to do it...
>
> There's no reason to be rude. In point of fact I have read the system
> docs on bash, and quite a bit of supplementary literature. :)
Yeah, coffee was out. Since my last email I drunk some cups so it should
be better now ;)
>
> > o use sth else to login remotely
>
> I'm not familiar with sth. Another option for the su case that I've
> been using very successfully is the --rcfile option. I have an alias
> like this:
>
> alias rootme='/usr/bin/su -m root --rcfile $HOME/.bash_profile'
>
> which allows me both to have the option of carrying my native
> environment around or just using su if I want the root environment.
You would get the same result with a `su -' while a simple `su' leaves
your native env. Thats what the first paragraph of the INVOCATION part of
bash (1) is about.
> There are other ways of accomplishing this using combinations of
> .bash_profile and .bashrc files, but I've found that this system works
> well for me.
It can be very tricky. I generally put everything global in /etc/profile,
additional paths in .bash_profile and alias'es in .bashrc. It works and if
not, I'll change it ;)
Regardz,
Sascha
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9808040601590.353-100000>
