LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   emacs shell-mode doesn't interpret prompt variable (https://www.linuxquestions.org/questions/linux-software-2/emacs-shell-mode-doesnt-interpret-prompt-variable-321498/)

CoonerTheRed 05-08-2005 10:28 PM

emacs shell-mode doesn't interpret prompt variable
 
I use tcsh, and xemacs, and consequently use tcsh in emacs under shell-mode.

I also have a nice line in my .tcshrc file to make the prompt pretty, ie:

Code:

set prompt="[${rgb_usr}%n@%m ${rgb_std}%c${rgb_restore}]${rgb_std} %#${rgb_restore} "
where rgb_* variables are different colors.

Unfortunately, emacs shell-mode doesn't recognize the colors, giving me an emacs prompt that looks like:

Code:

[^ [[00;37m<username>@<hostname> ^ [[00;35m~^ [[00m]^ [[00;35m >^ [[00m
where I've inserted a space between the ^ and [ to make html happy. I'm not sure what I really want to do... if I could get shell-mode to interpret the tcsh prompt variable correctly and display the colors like in my standard xterm, I'd be happiest. If that doesn't work, I guess I'd rather have two prompt variables- one used by tcsh in an xterm, the other by emacs. Is there a good way to fix this? Not really sure what the "right" thing to do is....

thanks much!

slackie1000 05-09-2005 04:23 AM

* slackie1000 uses vim *

hi there,

a solution to your problem is switching to ansi-term
Code:

ansi-term
this mode will interpret your tcsh prompt if you want.
imho, the shell mode in emacs is quite unstable. did you try "man" in shell-mode in emacs?
but i suggest as terminal solution to use in emacs the builtin emacs shell
Code:

eshell
i think it is quite okay with some necessary features.

regards

slackie1000


All times are GMT -5. The time now is 06:20 AM.