org.codehaus.plexus.util.cli.shell

Class BourneShell

public class BourneShell extends Shell

Version: $Id: BourneShell.java 8010 2009-01-07 12:59:50Z vsiveton $

Author: Jason van Zyl

Constructor Summary
BourneShell()
BourneShell(boolean isLoginShell)
Method Summary
StringgetExecutable()
protected StringgetExecutionPreamble()
protected char[]getQuotingTriggerChars()
String[]getShellArgs()
ListgetShellArgsList()
protected static StringunifyQuotes(String path)

Unify quotes in a path for the Bourne Shell.

 BourneShell.unifyQuotes(null)                       = null
 BourneShell.unifyQuotes("")                         = (empty)
 BourneShell.unifyQuotes("/test/quotedpath'abc")     = /test/quotedpath\'abc
 BourneShell.unifyQuotes("/test/quoted path'abc")    = "/test/quoted path'abc"
 BourneShell.unifyQuotes("/test/quotedpath\"abc")    = "/test/quotedpath\"abc"
 BourneShell.unifyQuotes("/test/quoted path\"abc")   = "/test/quoted path\"abc"
 BourneShell.unifyQuotes("/test/quotedpath\"'abc")   = "/test/quotedpath\"'abc"
 BourneShell.unifyQuotes("/test/quoted path\"'abc")  = "/test/quoted path\"'abc"
 

Constructor Detail

BourneShell

public BourneShell()

BourneShell

public BourneShell(boolean isLoginShell)

Method Detail

getExecutable

public String getExecutable()
{@inheritDoc }

getExecutionPreamble

protected String getExecutionPreamble()

getQuotingTriggerChars

protected char[] getQuotingTriggerChars()

getShellArgs

public String[] getShellArgs()

getShellArgsList

public List getShellArgsList()

unifyQuotes

protected static String unifyQuotes(String path)

Unify quotes in a path for the Bourne Shell.

 BourneShell.unifyQuotes(null)                       = null
 BourneShell.unifyQuotes("")                         = (empty)
 BourneShell.unifyQuotes("/test/quotedpath'abc")     = /test/quotedpath\'abc
 BourneShell.unifyQuotes("/test/quoted path'abc")    = "/test/quoted path'abc"
 BourneShell.unifyQuotes("/test/quotedpath\"abc")    = "/test/quotedpath\"abc"
 BourneShell.unifyQuotes("/test/quoted path\"abc")   = "/test/quoted path\"abc"
 BourneShell.unifyQuotes("/test/quotedpath\"'abc")   = "/test/quotedpath\"'abc"
 BourneShell.unifyQuotes("/test/quoted path\"'abc")  = "/test/quoted path\"'abc"
 

Parameters: path not null path.

Returns: the path unified correctly for the Bourne shell.

Copyright © 2001-2010 Codehaus. All Rights Reserved.