[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with Emacs 22.2.1 using TRAMP and PuTTY/plink

From: lyallp
Subject: Re: Help with Emacs 22.2.1 using TRAMP and PuTTY/plink
Date: Sun, 4 May 2008 04:57:00 -0700 (PDT)
User-agent: G2/1.0

Thanks for replying Michael.

I don't consider myself a noob at bash, but my problem is that I do
not know how to determine what the terminal is.
I can determine if it's an interactive login, but that does not help
me when it comes to TRAMP.
How do I differentiate me, from TRAMP?
Another part of my problem is that the server in question, on which I
am not an admin, sets TERM=vt100 in /etc/profile, unconditionally.

My PS1 string contains an escape sequence which updates my XTERM
window title with my "Host - User - pwd".

I looked in TRAMP and it's simply looking for a regexp (contained in
tramp-shell-prompt-pattern), which includes, amongst other junk, a
newline followed by $ space. (which my PS1 does have - I have my
username/host/pwd followed by a newline, then $ space - rather than
having the $ space at the end of a potentially long prompt string).

Even if it did think my prompt was earlier in the string, it does not
matter, so long as it proceeds, as almost the first thing TRAMP does
is start up /bin/sh with a prompt defined by itself as "$ "
The problem is it doesn't find my prompt without changing the end of
line parameter, which then screws up the execution of /bin/sh because
the character is interpreted as forming part of the /bin/sh filename
(much like if you edit a shell script with a windows editor - the #!/
bin/bash suddenly has a CR on the end and the script refuses to
execute because the system cannot find an executable called "/bin/bash


On May 4, 8:23 pm, Michael Albinus <address@hidden> wrote:
> lyallp <address@hidden> writes:
> > unset HISTORY\r
> >>^H^[]2 the_host - user_name - /home/user_name address@hidden:>^H~^M
> > $
> >>^H^[]2 the_host - user_name - /home/user_name address@hidden:>^H~^M
> > $
> > Any assistance would be greatly appreciated.
> I'm not confident that Tramp's EOL handling is guilty. It looks like
> your prompt includes escape sequences, which disturb Tramp in
> general. You should suppress such settings, for example by setting your
> prompt depending on the terminal type.
> > ...Lyall
> Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]