Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!ucsd!ucrmath!bartok!yakker From: yakker@bartok.ucr.edu (The Rastafari Yakker) Newsgroups: comp.unix.questions Subject: Re: Time in prompt? Message-ID: <1106@ucrmath.UCR.EDU> Date: 13 Jun 89 20:16:54 GMT References: <506@cybaswan.UUCP> Sender: news@ucrmath.UCR.EDU Reply-To: yakker@bartok.UUCP (The Rastafari Yakker) Followup-To: yakker@ucrmath.ucr.edu Organization: University of California, Riverside Lines: 27 There are a number of ways to put the time into the prompt, but it may not be the best thing to do. Here's a little command I tried and got to work, but there's a problem with it: set prompt = "(`date '+%H:%M:%S'`): " This works, but the time isn't updated. The C shell has to be reset in order to update the time. If you wanted to constantly update the time, you would have to run a constant (C) shell in the background that runs a command and then updates the prompt time. set prompt = "(`date '+%H:%M:%S'`): " alias cd 'chdir \!*; set prompt = "(`date '+%H:%M:%S'`): "' Other than this, I don't know of another way to correctly change the time without creating another shell in the background and making it more of a bother than checking your watch. ---------------------------------------*-------------------------------------- "Behold, God, is my salvation, I | Internet: yakker@ucrmath.ucr.edu will trust, and not be afraid.." |+| UUCP: ...ucsd!ucrmath!yakker |+|+| "What lies behind you and what lies |+|+| The University of California before you pales insignificant when |+| at Riverside compared to what lies within you.." | Department of Computer Science ---------------------------------------*--------------------------------------