Path: utzoo!attcan!uunet!husc6!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: comp.emacs Subject: Re: Change prompt in M-x shell buffer? Message-ID: <29423@bbn.COM> Date: 7 Sep 88 20:16:03 GMT References: <1094@cs.Buffalo.EDU> Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 19 In-reply-to: ansley@sunybcs.uucp (William Ansley) In article <1094@cs.Buffalo.EDU>, ansley@sunybcs (William Ansley) writes: > I use the tcsh (a C shell with file name >completion and command line editing) shell normally but I use a csh when in >emacs, since emacs can't deal with all the extra features of tcsh. In other >words I have 'explicit-shell-file-name' and 'shell-file-name' set to /bin/csh >in my .emacs file. I use special tcsh functions in my prompt, so in the shell >buffer my prompt turns into garbage, since csh doesn't understand the tcsh >prompt commands. tcsh defines the shell variable `tcsh' to be true before running your .cshrc, so you can conditionalize the shell startup this way. For example, my .cshrc includes: if ( $?tcsh ) set prompt="[$HOST.%\!] " [where I have already set up $HOST] because the syntax for inserting the line numebr into the prompt is different for tcsh and csh. I also conditionalize the tcsh key bindings this way. --