Date: Wed, 13 Mar 1996 09:29:39 -0500 (EST) From: Chuck Robey <chuckr@Glue.umd.edu> To: Mike Coffey & Yvonne Shevnin <mikec@mediacity.com> Cc: questions@freebsd.org Subject: Re: How to make current directory show at the commandline? Message-ID: <Pine.OSF.3.91.960313092500.2120A-100000@professor.eng.umd.edu> In-Reply-To: <31468A3B.28B6@mediacity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91.960313092500.2120A-100000>