Path: utzoo!utgpu!attcan!uunet!convex!convexs!white From: white@convexs.uucp (Tom White) Newsgroups: comp.unix.questions Subject: Re: Carriage return in prompt (tcsh) Summary: Getting a multple line prompt for tcsh Keywords: tcsh prompt Message-ID: <785@convex.UUCP> Date: 6 Jan 89 00:43:10 GMT References: <11581@dartvax.Dartmouth.EDU> Sender: news@convex.UUCP Reply-To: white@convexs.UUCP (Tom White) Organization: Convex Computer Corporation, Richardson, Tx. Lines: 32 In article <11581@dartvax.Dartmouth.EDU> jim@libdev.dartmouth.edu (Jim Shain) writes: > Does anyone know how I can get a carriage return in my prompt >under tcsh? A few months ago someone posted the way to do it in csh but >everything I've tried in tcsh gives me the actual control character. For >instance, it will give me a "^M" instead of a carriage return. Jim, the only way that I've been able to figure out how to get a multiple line prompt under tcsh is to use the 'set precmd' enviroment variable. I wasn't able to spend a lot of time experimenting so there may be a better way to do this. However, heres a copy of the lines in my .cshrc file that I use: set hostname = `hostname` alias cd 'set old=$cwd; chdir \!*' if ($?tcsh) then alias precmd 'echo "";echo "${hostname}:${cwd}"' set prompt = "> " endif This gives me a prompt that looks like: convexs:/mnt/white > The only problem that I've had with this is that a keyboard interrupt (^C, DEL, whatever) when tcsh is executing the precmd will cause the precmd to be removed (you can get it back by justing sourcing your .cshrc file). Tom White Convex Computer Corporation - 701 N. Plano Rd. - Richardson, TX 75083 UUCP: ...!{uiucdcs,sun,uunet,harvard,killer,usenix}!convex!white