From owner-freebsd-questions Mon Oct 18 4:26:31 1999 Delivered-To: freebsd-questions@freebsd.org Received: from smtp13.bellglobal.com (smtp13.bellglobal.com [204.101.251.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DAD014BDD for ; Mon, 18 Oct 1999 04:26:28 -0700 (PDT) (envelope-from a.genkin@utoronto.ca) Received: from main.wgaf.net (HSE-TOR-ppp22851.sympatico.ca [209.226.71.141]) by smtp13.bellglobal.com (8.8.5/8.8.5) with ESMTP id HAA29794 for ; Mon, 18 Oct 1999 07:28:30 -0400 (EDT) Received: from antipode by main.wgaf.net with local (Exim 2.05 #1 (Debian)) id 11dC4B-00050R-00; Mon, 18 Oct 1999 08:39:07 -0400 To: freebsd-questions@freebsd.org Subject: Re: Bash prompt (/usr/home/username instead of ~/) References: <7170.940240864@axl.noc.iafrica.com> X-Home-Page: http://wgaf.dyndns.org Organization: Wgaf From: Arcady Genkin Date: 18 Oct 1999 08:39:07 -0400 In-Reply-To: Sheldon Hearn's message of "Mon, 18 Oct 1999 12:01:04 +0200" Message-ID: <871zasyhas.fsf@main.wgaf.net> Lines: 22 User-Agent: Gnus/5.070097 (Pterodactyl Gnus v0.97) XEmacs/21.1 (Biscayne) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 "~"). -- Arcady Genkin http://wgaf.dyndns.org "'What good is my pity? Is not the pity the cross upon which he who loves man is nailed?..'" (Zarathustra - F. Nietzsche) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message