From owner-freebsd-questions Wed Mar 29 9:55:52 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.whack.org (apogee.whack.org [216.186.243.163]) by hub.freebsd.org (Postfix) with ESMTP id 29AAA37BC52 for ; Wed, 29 Mar 2000 09:52:51 -0800 (PST) (envelope-from ryno@whack.org) Received: from mx1.whack.org ([216.186.243.182] ident=ryno) by mx1.whack.org with esmtp (Exim 3.13 #1) id 12aMds-0004S2-00; Wed, 29 Mar 2000 09:52:33 -0800 Date: Wed, 29 Mar 2000 09:52:30 -0800 (PST) From: Ryan Moser To: Vodyanoi Cc: FreeBSD Mail List -- Houston , FreeBSD-Questions Subject: Re: Prompt and Path questions In-Reply-To: <200003290559.AA228787102@mail.ev1.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 here's what i do to export my path @host PS1='\u@\h:[\w]->' that should work exactly how you want.you can change the lowercase w with a W and it will show you only the last directory of you current path. Ryan Moser On Wed, 29 Mar 2000, Vodyanoi wrote: > Hello all, > I appear to have a small issue with the setup of both my path and prompt settings. I am using sh for my shell. I have edited the prompt setting in the .shrc file in the home dir but it didn't work quite the way I expected it to. below is what I have in this file. what I had before was the same, I only added the "| `pwd'#" & $ sections. > > PS1="`whoami`@`hostname | sed 's/\..*//'`" > case `id -u` in > 0) PS1="${PS1}|`pwd`# ";; > *) PS1="${PS1}|`pwd`$ ";; > esac > > This gives the the prompt that I want (username@host|$) but it dosn't change when I change paths. I searched the archives for the mailing list and found somethig about using CD insteadof PS1 but not sure what CD is or how to set that up. > Also I seem to be having a problem with some commands that are located in my /usr/local/bin and /usr/local/sbin not running. I get the error message command not found and have to enter the full path with the command. I've checked and these paths are in my path setting. this happens mainly with programs that I've installed and not with the commands and programs that install orignally. > If someone could explain this to me or point me to the documentation about this that I've been missing. i am sure it's out there somewhere I just can't seem to find it > > Thanks, > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message