From owner-freebsd-questions Tue Oct 19 11:51:28 1999 Delivered-To: freebsd-questions@freebsd.org Received: from phoenix.volant.org (phoenix.volant.org [205.179.79.193]) by hub.freebsd.org (Postfix) with ESMTP id 5036D1794A for ; Tue, 19 Oct 1999 11:51:25 -0700 (PDT) (envelope-from patl@phoenix.volant.org) Received: from asimov.phoenix.volant.org ([205.179.79.65]) by phoenix.volant.org with smtp (Exim 1.92 #8) id 11deM0-00065r-00; Tue, 19 Oct 1999 11:51:24 -0700 Received: from localhost by asimov.phoenix.volant.org (SMI-8.6/SMI-SVR4) id LAA07483; Tue, 19 Oct 1999 11:51:21 -0700 Date: Tue, 19 Oct 1999 11:51:20 -0700 (PDT) From: patl@phoenix.volant.org Reply-To: patl@phoenix.volant.org Subject: Re: Bash prompt (/usr/home/username instead of ~/) To: Arcady Genkin Cc: freebsd-questions@freebsd.org In-Reply-To: <87ln905oew.fsf@main.wgaf.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 18-Oct-99 at 13:38, Arcady Genkin (a.genkin@utoronto.ca) wrote: > patl@phoenix.volant.org writes: > > > > What happens if you put a 'cd' command right after the prompt is set? > > > > Shouldn't that be 'cd .' just in case you aren't in your home directory? > > IMHO, Quite on the contrary. "cd ." would mean change into the current > directory, as opposed to "cd", which means change into home directory > by default... Yes, exactly my point. > In any case, I don't know what the current directory is when starting > bash. [leaves to check] Yep, putting "cd ." results in bash opening up > current directory. As I recall, the goal was to get the initial path components to show up as '~' when appropriate in the prompt; and the 'problem' was that it didn't seem to take effect until after the first 'cd' after setting PS1. The suggestion was to put a 'cd' after the 'PS1=...' in the .bashrc. My point is that you might not be in your home directory when bash is started; and that changing the current directory is likely to be an undesired side-effect. Using 'cd .' should have no side-effects beyond triggering the change in the prompt. -Pat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message