Bug 162857 - [ssh shells] Command prompt appears twice
Summary: [ssh shells] Command prompt appears twice
Status: NEW
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.3.1   Edit
Assignee: dsdp.tm.rse-inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
: 169798 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-31 03:44 EST by Norbert Plött CLA
Modified: 2011-05-31 17:49 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norbert Plött CLA 2006-10-31 03:44:56 EST
After connecting via SSH and opening a shell I can enter commands (which is good). But there are issues with the linebreaks. Like so:

==================snip======================
pn3484@nb14520d:~> 
echo hello
hello
pn3484@nb14520d:~> 
pn3484@nb14520d:~> 
==================snap======================

1) The command "echo hello" should appear on the same line as the prompt.
2) After the "hello" output two prompts are displayed.

Is this maybe because I am on Windows which does CR/LF and both are interpreted as LF by the Linux target?


-----------Enter bugs above this line-----------
RSE 1.0 Testing round 3
installation : eclipse-platform-3.2.1 (M20060921-0945), cdt-3.1.1
RSE install  : download mirror
java.runtime : Java(TM) 2 Runtime Environment, Standard Edition java.runtime.version=1.5.0_06-b05
os.name:     : Windows XP 5.1, Service Pack 2
------------------------------------------------
systemtype   : ssh only
targetos     : LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32" SUSE LINUX 10.0 (i586) VERSION = 10.0
targetuname  : Linux nb14520d 2.6.13-15-smp #1 SMP Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386
GNU/Linux
targetvm     : java version "1.4.2_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03) Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2006-10-31 07:24:24 EST
The double command prompt is due to the way how the remote current directory is queried and displayed in an RSE-compatible prompt: the SshServiceCommandShell issues an extra "; echo `pwd`>" command after every normal given command. Because of that, two normal prompts are shown on ssh.

I see two possibilities for fixing this:
a) Once environment variable setup is fully integrated, we can set $PS1=$PWD> and thus avoid the extra prompting. That's the way how dstore handles this.
b) We could try to match what the remote system sends as prompt, and suppress printing it.

I like approach (a) better. 
To be done after 1.0.
Comment 2 Norbert Plött CLA 2006-11-03 04:12:08 EST
> I like approach (a) better. 

I like approach (b) better. The user's chosen environment should not be modified because of the special needs of RSE. 

Or, (c), could the RSE issue it's echo `pwd` as a separate command and suppress the output until after pwd has completed?

> To be done after 1.0.

Sure. This is just "not nice", a minor defect.
Comment 3 Martin Oberhuber CLA 2007-01-08 05:19:49 EST
*** Bug 169798 has been marked as a duplicate of this bug. ***
Comment 4 Martin Oberhuber CLA 2008-09-16 15:45:02 EDT
Deferring shell (RSE Commandview) related bugs since ITerminalService is more interesting for WR now
Comment 5 Hemang Lavana CLA 2008-12-24 10:05:32 EST
Adding myself to CC list.
Comment 6 Martin Oberhuber CLA 2011-05-31 17:49:18 EDT
Bulk moving 3.3 deferred items to 3.3.1