[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weird emacs shell behavior
From: |
Tassilo Horn |
Subject: |
Re: weird emacs shell behavior |
Date: |
Sat, 18 Aug 2007 16:36:55 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 17.08.2007 um 21:34 schrieb Tassilo Horn:
>
>> | > echo "Hello, test!" <== That's what I typed. It's bold after RET
>
> It becomes interpreted as prompt. Check comint-prompt-regexp and
> shell-prompt-pattern.
,----[ C-h v comint-prompt-regexp RET ]
| comint-prompt-regexp is a variable defined in `comint.el'.
| Its value is
| "^[^#$%>\n]*[#$%>] *"
| Local in buffer *shell*; global value is "^"
|
| Documentation:
| Regexp to recognize prompts in the inferior process.
| Defaults to "^", the null string at BOL.
|
| This variable is only used if the variable
| `comint-use-prompt-regexp' is non-nil.
`----
By default `comint-use-prompt-regexp' is nil in *shell*. I've set it to
t, but that doesn't change things.
,----[ C-h v shell-prompt-pattern RET ]
| shell-prompt-pattern is a variable defined in `shell.el'.
| Its value is
| "^[^#$%>\n]*[#$%>] *"
`----
So it seems that `comint-prompt-regexp' is set to `shell-prompt-pattern'
in shell-mode.
And this regexp matches my prompt. It's only a simple "> " when TERM is
set to dumb.
(string-match shell-prompt-pattern "> ") == C-x C-e ==> 0
>> | > echo "Hello, test!" <== After my RET the line gets repeated...
>
> Again, it seems to be kept for the prompt?
>
>> | ^[]2;echo ~^GHello, test! <== After the ^G comes the output.
>> `----
>>
>> Do you know what ^[ and ^G are for control chars and how I can get rid
>> of them?
>
> ESC and BELL. Maybe you should check which echo you are using, what is
> set for it, and what else is set for the shell interpreter running in
> *shell* buffer.
,----
| > which echo
| > which echo
| ^[]2;which ~^G/bin/echo
`----
echo --help tells me it's the echo from coreutils 6.9.
,----
| > env
| > env
| ^[]2;env ~^GEMACS=t
| CLASSPATH= [snipped]
| DISPLAY=:0
| CVS_RSH=ssh
| INSIDE_EMACS=22.1.50.1,comint
| MAIL=/var/mail/heimdall
| JAVA_HOME=/opt/sun-jdk-1.6.0
| WINDOWPATH=7
| RI=--format ansi --width 80
| TERM=dumb
| SHLVL=2
| GREP_OPTIONS=--color=auto
| USER=heimdall
| GREP_COLOR=97;45
| LOGNAME=heimdall
| HOME=/home/heimdall
| DARCS_EDITOR=emacsclient
| INPUTRC=/etc/fish/fish_inputrc
| HUSHLOGIN=FALSE
| RGHOME=/home/heimdall/uni/repos/re-group/trunk
| VISUAL=emacsclient
| ANTLR_HOME=/usr/share/antlr/lib
| LS_COLORS=
| LC_ALL=en_US.UTF-8
|
PATH=/bin:/usr/bin:/usr/X11R6/bin:/opt/bin:/usr/games/bin:/home/heimdall/bin:/usr/kde/3.5/bin:/usr/local/bin
| EDITOR=emacsclient
| COLUMNS=96
| BOUML_ID=50
| BROWSER=firefox
| JAVA_VERSION=1.6.0
| TERMCAP=
| XAUTHORITY=/home/heimdall/.Xauthority
| LANG=en_US.UTF-8
| MAILHOST=pop.gmx.de
| SHELL=/bin/fish
| PWD=/home/heimdall
`----
> After all: are you using GNU Emacs 22?
Yes, a some hours old CVS checkout.
Bye,
Tassilo
- weird emacs shell behavior, phundamental unaudio, 2007/08/17
- Re: weird emacs shell behavior, Joel J. Adamson, 2007/08/17
- Re: weird emacs shell behavior, Tassilo Horn, 2007/08/17
- Re: weird emacs shell behavior, Peter Dyballa, 2007/08/17
- Message not available
- Re: weird emacs shell behavior,
Tassilo Horn <=
- Re: weird emacs shell behavior, Peter Dyballa, 2007/08/18
- Message not available
- Re: weird emacs shell behavior, Tassilo Horn, 2007/08/18