jim@libdev.dartmouth.edu (Jim Shain) (12/30/88)
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. Any ideas? Jim Shain libdev.dartmouth.edu (603) 646-3316
white@convexs.uucp (Tom White) (01/06/89)
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