From owner-freebsd-questions Thu Mar 14 05:53:54 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA06323 for questions-outgoing; Thu, 14 Mar 1996 05:53:54 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id FAA06318 for ; Thu, 14 Mar 1996 05:53:53 -0800 (PST) Received: from uswat.advtech.uswest.com (firewall-user@uswat.advtech.uswest.com [130.13.16.1]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id FAA01580 for ; Thu, 14 Mar 1996 05:53:52 -0800 Received: from egate.mnet.uswest.com ([151.116.23.138]) by uswat.advtech.uswest.com (8.7.5/8.7.3) with ESMTP id GAA03514; Thu, 14 Mar 1996 06:51:49 -0700 (MST) Received: from easthub (easthub.mnet.uswest.com [151.117.26.86]) by egate.mnet.uswest.com (8.7.1/8.7.1) with SMTP id HAA10152; Thu, 14 Mar 1996 07:00:05 -0700 (MST) Received: by easthub.mnet.uswest.com (M-Net Hub.951228) Received: from astro.acs.uswest.com by acs.uswest.com (5.x/SMI-SVR4) id AA03960; Thu, 14 Mar 1996 07:51:38 -0600 Received: from kermit by astro.acs.uswest.com (SMI-8.6/SMI-SVR4) id HAA19258; Thu, 14 Mar 1996 07:51:28 -0600 Message-Id: <31482460.754D@uswest.com> Date: Thu, 14 Mar 1996 07:51:28 -0600 From: "Paul T. Root" Organization: !nterprise Networking Services X-Mailer: Mozilla 2.0 (X11; I; SunOS 5.4 sun4m) Mime-Version: 1.0 To: Gabor Zahemszky Cc: Mike Coffey & Yvonne Shevnin , freebsd-questions@freebsd.org Subject: Re: How to make current directory show at the commandline? References: <199603131507.PAA00889@CoDe.CoDe.hu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Gabor Zahemszky wrote: > > > > > I would like the current directory that I am at to display at the command > > line like it does in DOS. Is there anyway to emulate this? > > > > Thanks-- Yvonne Shevnin > > > > in csh (not tcsh): > alias cd 'cd \!* ; set prompt = "$cwd "' > and after it, make a cd . > in ksh/pdksh: > PS1='$PWD ' > > You cannot do it in sh (ash) One should never say cannot: For sh/ksh/pdksh/bash: (though there are better ways for ksh/pdksh/bash) Define a function in your .profile: cd() { chdir $* PS1="`pwd`" } > -- > Gabor Zahemszky > > -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:- > Earth is the cradle of human sense, but you can't stay in the cradle forever. > Tsiolkovsky -- Paul T. Root E/Mail: ptroot@uswest.com 200 S. 5th St. Suite 1100 PAG: +1 (800) SKY-PAGE PIN: 537-7370 Minneapolis, MN 55402 WRK: +1 (612) 663-1979 NIC: PTR FAX: +1 (612) 663-8030