From owner-freebsd-questions Mon Oct 18 10:46:45 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id 8F4B914F80 for ; Mon, 18 Oct 1999 10:46:39 -0700 (PDT) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.9.3) id NAA13522; Mon, 18 Oct 1999 13:49:40 -0400 (EDT) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199910181749.NAA13522@cc942873-a.ewndsr1.nj.home.com> Subject: Re: Bash prompt (/usr/home/username instead of ~/) In-Reply-To: <871zasyhas.fsf@main.wgaf.net> from Arcady Genkin at "Oct 18, 1999 08:39:07 am" To: a.genkin@utoronto.ca (Arcady Genkin) Date: Mon, 18 Oct 1999 13:49:40 -0400 (EDT) Cc: freebsd-questions@FreeBSD.ORG Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Arcady Genkin wrote, > Sheldon Hearn writes: > > > On 18 Oct 1999 05:57:44 -0400, Arcady Genkin wrote: > > > > > while PS1 is set to '\h:\w\$ ' > > > > > Use \W instead of \w . > > Thanks, Sheldon, but that's not quite what I wanted. \W gives me only > the trailing name of the current directory. So if I am in ~/src/csc/, > it gives me "door:csc$". > > My problem was that with \w it says "/usr/home/antipode/src/csc", > whereas I would like it to say "~/src/csc". And the funny part of the > problem was that it starts to behave the way I want it to after I > simply type "cd" w/o arguments (then bash replaces "u/h/antipode" with > "~"). What happens if you put a 'cd' command right after the prompt is set? -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message