From owner-freebsd-questions Mon Aug 3 21:14:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA25740 for freebsd-questions-outgoing; Mon, 3 Aug 1998 21:14:03 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from www.schell.de ([195.20.238.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA25668 for ; Mon, 3 Aug 1998 21:13:53 -0700 (PDT) (envelope-from sas@schell.de) Received: from guerilla.foo.bar (hennen15.iserlohn.netsurf.de [194.195.194.207]) by www.schell.de (8.9.0/8.9.0) with ESMTP id GAA26439; Tue, 4 Aug 1998 06:13:41 +0200 Received: from localhost (localhost.foo.bar [127.0.0.1]) by guerilla.foo.bar (8.9.1/8.9.1) with SMTP id GAA00363; Tue, 4 Aug 1998 06:13:04 +0200 (CEST) Date: Tue, 4 Aug 1998 06:13:04 +0200 (CEST) From: Sascha Schumann To: Studded cc: William Woods , "freebsd-questions@FreeBSD.ORG" Subject: Re: BASH prompt question In-Reply-To: <35C6816E.58367535@dal.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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