Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!gatech!ncar!unmvax!uokmax!jkmedcal From: jkmedcal@uokmax.ecn.uoknor.edu (Jeff Medcalf) Newsgroups: comp.unix.wizards Subject: Re: pwd prompts in unix Message-ID: <1991Jun24.140512.6143@uokmax.ecn.uoknor.edu> Date: 24 Jun 91 14:05:12 GMT References: <27275@adm.brl.mil> Organization: No, it isn't really. (University of Oklahoma, ECN) Lines: 31 ketell@tolkien (Gregory Ketell) writes: >CSH: > Create two aliases in your .cshrc file > alias cd 'cd \!*;promp' > alias promp 'set prompt = "`hostname`:`pwd` ! > "' > This will result in a prompt such as tolkien:/usr/bin 23 > > which tells you which machine you are currently on, your path, and > what history command you are on. This could be done in a single alias: alias cd 'cd \!* ; set prompt = "`hostname`:`pwd` ! > "' and then follow this with a cd . command (which would stay in the cwd but set the prompt. In tcsh, I use the following to shell commands in my .cshrc: set prompt=%m\[%c\]\{%!\}\: set prompt2=%m\[%c\]\{%!\}\? %m is replaced by the machine name, %c is replaced by the last element of the cwd, and %! is replaced by the history number. -- Jeff Medcalf jkmedcal@uokmax.{uucp|ecn.uoknor.edu} !chinet!uokmax!jkmedcal BoB smokes *my* pipe! We carry in our hearts the true country... In 1869, the waffle iron was invented, thus solving the annoying tendency of waffles to wrinkle in the dryer. No new tale to tell.