Package org.codehaus.plexus.util.cli.shell

# Class BourneShell

java.lang.Object
org.codehaus.plexus.util.cli.shell.Shell
org.codehaus.plexus.util.cli.shell.BourneShell

All Implemented Interfaces:
  `Cloneable`

public class BourneShell extends Shell

Author:
  Jason van Zyl

## Constructor Summary

Constructors
Constructor
Description
`BourneShell()`
`BourneShell(boolean isLoginShell)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getExecutable()`
`protected String`
`getExecutionPreamble()`
`String[]`
`getShellArgs()`
`List<String>`
`getShellArgsList()`
`protected String`
`quoteOneItem(String path, boolean isExecutable)`
Unify quotes in a path for the Bourne Shell.

### Methods inherited from class org.codehaus.plexus.util.cli.shell.Shell

`addShellArg, clearArguments, clone, getArgumentEscapePattern, getArgumentQuoteDelimiter, getCommandLine, getEscapeChars, getExecutableQuoteDelimiter, getOriginalCommandLine, getOriginalExecutable, getQuotingTriggerChars, getRawCommandLine, getShellCommand, getShellCommandLine, getWorkingDirectory, getWorkingDirectoryAsString, isDoubleQuotedArgumentEscaped, isDoubleQuotedExecutableEscaped, isQuotedArgumentsEnabled, isQuotedExecutableEnabled, isSingleQuotedArgumentEscaped, isSingleQuotedExecutableEscaped, setArgumentEscapePattern, setArgumentQuoteDelimiter, setDoubleQuotedArgumentEscaped, setDoubleQuotedExecutableEscaped, setExecutable, setExecutableQuoteDelimiter, setQuotedArgumentsEnabled, setQuotedExecutableEnabled, setShellArgs, setShellCommand, setSingleQuotedArgumentEscaped, setSingleQuotedExecutableEscaped, setUnconditionalQuoting, setWorkingDirectory, setWorkingDirectory`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### BourneShell

public BourneShell()

### BourneShell

public BourneShell(boolean isLoginShell)

## Method Details

### getExecutable

public String getExecutable()

Overrides:
  `getExecutable` in class `Shell`

### getShellArgsList

public List<String> getShellArgsList()

Overrides:
  `getShellArgsList` in class `Shell`

### getShellArgs

public String[] getShellArgs()

Overrides:
  `getShellArgs` in class `Shell`
Returns:
  the shell arguments

### getExecutionPreamble

protected String getExecutionPreamble()

Overrides:
  `getExecutionPreamble` in class `Shell`

### quoteOneItem

protected String quoteOneItem(String path, boolean isExecutable)

Unify quotes in a path for the Bourne Shell.

     BourneShell.quoteOneItem(null)                       = null
     BourneShell.quoteOneItem("")                         = ''
     BourneShell.quoteOneItem("/test/quotedpath'abc")     = '/test/quotedpath'"'"'abc'
     BourneShell.quoteOneItem("/test/quoted path'abc")    = '/test/quoted pat'"'"'habc'
     BourneShell.quoteOneItem("/test/quotedpath\"abc")    = '/test/quotedpath"abc'
     BourneShell.quoteOneItem("/test/quoted path\"abc")   = '/test/quoted path"abc'
     BourneShell.quoteOneItem("/test/quotedpath\"'abc")   = '/test/quotedpath"'"'"'abc'
     BourneShell.quoteOneItem("/test/quoted path\"'abc")  = '/test/quoted path"'"'"'abc'

Overrides:
  `quoteOneItem` in class `Shell`
Parameters:
  `path` - not null path.
Returns:
  the path unified correctly for the Bourne shell.