[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tm-cvs-commit] dmcknight org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command CommandMinerThread.java OutputHandler.java

Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command
In directory dev2:/tmp/cvs-serv5044/miners/org/eclipse/rse/internal/dstore/universal/miners/command

Modified Files:
	CommandMinerThread.java OutputHandler.java 
Log Message:
[372968] [dstore][shell] provide support for csh and tcsh shells


Index: CommandMinerThread.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** CommandMinerThread.java	23 Feb 2012 14:25:56 -0000	1.47
--- CommandMinerThread.java	6 Mar 2012 13:48:58 -0000	1.48
***************
*** 36,39 ****
--- 36,40 ----
   *  David McKnight   (IBM)     [339741] [dstore][shells] consecutive prompt line is ignored
   *  Noriaki Takatsu  (IBM)     [369767] [multithread][dstore] Invalid Default directory in shell Launch
+  *  David McKnight   (IBM)     [372968] [dstore][shell] provide support for csh and tcsh shells
   *******************************************************************************/
  
***************
*** 274,280 ****
  							isSHonZ = true;
  						}
! 						else if (theShell.endsWith("/csh") || theShell.endsWith("/bsh")){  //$NON-NLS-1$//$NON-NLS-2$
  							_isCsh = true;			
  						}
  					}
  					// In a single-process server, both user.home and HOME don't represent
--- 275,282 ----
  							isSHonZ = true;
  						}
! 						else if (theShell.endsWith("/csh") || theShell.endsWith("/tcsh") || theShell.endsWith("/bsh")){  //$NON-NLS-1$//$NON-NLS-2$
  							_isCsh = true;			
  						}
+ 
  					}
  					// In a single-process server, both user.home and HOME don't represent
***************
*** 557,561 ****
  			{
  				// unsupported prompting
! 				boolean unsupportedPrompt = theShell.endsWith("csh") || theShell.endsWith("bsh") ||   //$NON-NLS-1$//$NON-NLS-2$
  											theShell.endsWith("tsh") || theShell.endsWith("rksh");  //$NON-NLS-1$//$NON-NLS-2$
  				
--- 559,563 ----
  			{
  				// unsupported prompting
! 				boolean unsupportedPrompt = theShell.endsWith("bsh") ||   //$NON-NLS-1$//$NON-NLS-2$
  											theShell.endsWith("tsh") || theShell.endsWith("rksh");  //$NON-NLS-1$//$NON-NLS-2$
  				
***************
*** 563,567 ****
  				String initCmd = ""; //$NON-NLS-1$
  				if (_isTTY && !unsupportedPrompt){
! 					initCmd = "export PS1='$PWD>';" ; //$NON-NLS-1$ 
  				}
  				 if (didLogin && !userHome.equals(_cwdStr)){
--- 565,574 ----
  				String initCmd = ""; //$NON-NLS-1$
  				if (_isTTY && !unsupportedPrompt){
! 					if (_isCsh){
! 						initCmd = "set prompt=\"$PWD>\""; //$NON-NLS-1$ 
! 					}
! 					else {
! 						initCmd = "export PS1='$PWD>';" ; //$NON-NLS-1$ 
! 					}
  				}
  				 if (didLogin && !userHome.equals(_cwdStr)){
***************
*** 687,691 ****
  			
  			if (_isCsh && origInput.startsWith("export ")){ //$NON-NLS-1$
! 				input = origInput.replaceAll("export ", "set ");  //$NON-NLS-1$//$NON-NLS-2$
  			}			
  			
--- 694,698 ----
  			
  			if (_isCsh && origInput.startsWith("export ")){ //$NON-NLS-1$
! 				input = origInput.replaceAll("export ", "setenv ").replaceAll("=", " ");  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
  			}			
  			

Index: OutputHandler.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** OutputHandler.java	5 May 2011 18:57:02 -0000	1.22
--- OutputHandler.java	6 Mar 2012 13:48:58 -0000	1.23
***************
*** 1,4 ****
  /*******************************************************************************
!  * Copyright (c) 2006, 2011 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
--- 1,4 ----
  /*******************************************************************************
!  * Copyright (c) 2006, 2012 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
***************
*** 25,28 ****
--- 25,29 ----
   * David McKnight   (IBM)     [341366] [dstore][shells] codepage IBM-1141 has faulty display of \ character
   * David McKnight   (IBM)     [343421] [dstore] Man page was not displayed properly in the shell
+  * David McKnight   (IBM)     [372968] [dstore][shell] provide support for csh and tcsh shells
   *******************************************************************************/
  
***************
*** 296,301 ****
  						String lastLine = output[index - 1];
  
! 						boolean endLine = fullOutput.endsWith("\n") || fullOutput.endsWith("\r") || fullOutput.endsWith(">");
! 						
  						if (!_endOfStream && !endLine)
  						{
--- 297,303 ----
  						String lastLine = output[index - 1];
  
! 						boolean endLine = fullOutput.endsWith("\n") || fullOutput.endsWith("\r") ||   //$NON-NLS-1$//$NON-NLS-2$
! 										fullOutput.endsWith(">") || //$NON-NLS-1$
! 										fullOutput.endsWith("% "); // csh/tcsh //$NON-NLS-1$
  						if (!_endOfStream && !endLine)
  						{