From 052baeec646725a15d22b1a268ed1795be3db115 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Thu, 8 Jul 2010 15:08:36 +0000 Subject: [PATCH] [318372] [dstore][shells] "export" shell command invalid for certain shells --- .../universal/miners/command/CommandMinerThread.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java index 84d8becd0aa..cae9cef2885 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java @@ -113,6 +113,8 @@ public class CommandMinerThread extends MinerThread private OutputHandler _stdOutputHandler; private OutputHandler _stdErrorHandler; private boolean _isShell; + private boolean _isCsh = false; + private boolean _isDone; private boolean _isWindows; private boolean _isTTY; @@ -261,6 +263,9 @@ public class CommandMinerThread extends MinerThread { 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 // each client home directory. @@ -666,7 +671,9 @@ public class CommandMinerThread extends MinerThread input = convertSpecialCharacters(input); } input.getBytes(); - + if (_isCsh && origInput.startsWith("export ")){ //$NON-NLS-1$ + input = origInput.replaceAll("export ", "set "); //$NON-NLS-1$//$NON-NLS-2$ + } try { BufferedWriter writer = _stdOutput;