[Top][All Lists]

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

Strange prompt in tramp remote shell

From: Christian Millour (AB TELA)
Subject: Strange prompt in tramp remote shell
Date: Wed, 03 Nov 2010 12:52:52 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv: Gecko/20101027 Thunderbird/3.1.6


I don't know whether this is a tramp issue or a shell(.el) issue, but I am getting a strange prompt when running a remote shell using plink from ntemacs on Win7 to a remote linux host. It looks like the prompt is set to the value of tamp-end-of-output as defvar'd in tramp.el.

I first open a dired to user's home directory on the remote machine (C-x C-f /plink:address@hidden:). Then in this buffer I type C-u M-x shell, name the buffer *remote* and accept the default remote directory. The remote shell comes up OK but as mentioned the prompt is strange :

///cacd2b7cdc0b12a4e20392e313ca1390#$echo ">>>>$PS1<<<<"

the prompt can oviously be reset easily but this looks like a bug IMHO

///cacd2b7cdc0b12a4e20392e313ca1390#$PS1="address@hidden \w]$ "
address@hidden ~]$ echo $INSIDE_EMACS,tramp:2.1.19-pre
address@hidden ~]$ echo $SHELL
address@hidden ~]$ bash --version
GNU bash, version 3.00.15(1)-release (i686-redhat-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
address@hidden ~]$ uname -a
Linux remote 2.6.18-194.17.1.el5.028stab070.7 #1 SMP Fri Oct 1 14:59:55 MSD 2010 i686 i686 i386 GNU/Linux
address@hidden ~]$

One workaround for not having to reset the prompt manually for each session is to (setenv "ESHELL" "bash") in the .emacs and create a .emacs_bash containing

# reset the prompt for remote tramp shells
if [ "${INSIDE_EMACS/*tramp*/tramp}" == "tramp" ]; then PS1="address@hidden \w]$ ";fi

I wonder is there might be a cleaner way.

TIA, and best regards,

     Christian Millour -- address@hidden -- +33(0)6 80 13 26 82

Attachment: debug_tramp_slash_plink_user_at_remote
Description: Binary data

reply via email to

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