From owner-freebsd-questions Wed Mar 13 06:30:01 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA01084 for questions-outgoing; Wed, 13 Mar 1996 06:30:01 -0800 (PST) Received: from jolt.eng.umd.edu (jolt.eng.umd.edu [129.2.102.5]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id GAA01056 for ; Wed, 13 Mar 1996 06:29:48 -0800 (PST) Received: from professor.eng.umd.edu (professor.eng.umd.edu [129.2.98.207]) by jolt.eng.umd.edu (8.7.5/8.7.3) with ESMTP id JAA29129; Wed, 13 Mar 1996 09:29:40 -0500 (EST) Received: (from chuckr@localhost) by professor.eng.umd.edu (8.7.5/8.7.3) id JAA02129; Wed, 13 Mar 1996 09:29:39 -0500 (EST) Date: Wed, 13 Mar 1996 09:29:39 -0500 (EST) From: Chuck Robey X-Sender: chuckr@professor.eng.umd.edu To: Mike Coffey & Yvonne Shevnin cc: questions@freebsd.org Subject: Re: How to make current directory show at the commandline? In-Reply-To: <31468A3B.28B6@mediacity.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Wed, 13 Mar 1996, Mike Coffey & Yvonne Shevnin 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? You don't mention what shell you're using .. sh, csh, ksh, or maybe bash. If you're using csh (like me) then you need to add two lines to your .cshrc file. The first sets your initial login prompt: set prompt="`hostname -s`:`pwd`:\! >" And the second modifies the 'cd' command to change your prompt when you change directories: alias cd 'cd \!*;set prompt="`hostname -s`:`pwd`:\! >"' This gives you a prompt like: n3lxx:/usr/chuckr:52 > (my machine is named n3lxx). I need my machine name in there because I have two machines, and I'm always doing remote rlogins. This serves to remind me what machine I'm working on. If you don't want the machine name, taking the 'hostname -s' out would give that result. > > Thanks-- Yvonne Shevnin > ========================================================================== Chuck Robey chuckr@eng.umd.edu, I run FreeBSD-current on n3lxx + Journey2 Three Accounts for the Super-users in the sky, Seven for the Operators in their halls of fame, Nine for Ordinary Users doomed to crie, One for the Illegal Cracker with his evil game In the Domains of Internet where the data lie. One Account to rule them all, One Account to watch them, One Account to make them all and in the network bind them.