org.apache.felix.gogo.jline

## Class Shell

- java.lang.Object
- - org.apache.felix.gogo.jline.Shell

    public class Shell
    extends Object

### Nested Class Summary

Nested Classes
`static interface` `Shell.Context`

### Field Summary

Fields
`static String` `VAR_COMMAND_LINE`
`static String` `VAR_COMPLETIONS`
`static String` `VAR_CONTEXT`
`static String` `VAR_EXCEPTION`
`static String` `VAR_LOCATION`
`static String` `VAR_PROCESSOR`
`static String` `VAR_PROMPT`
`static String` `VAR_READER`
`static String` `VAR_RESULT`
`static String` `VAR_RPROMPT`
`static String` `VAR_SCOPE`
`static String` `VAR_SESSION`
`static String` `VAR_TERMINAL`

### Constructor Summary

Constructors
Constructor and Description
`Shell(Shell.Context context, org.apache.felix.service.command.CommandProcessor processor)`
`Shell(Shell.Context context, org.apache.felix.service.command.CommandProcessor processor, String profile)`
`Shell(Shell.Context context, org.apache.felix.service.command.CommandProcessor processor, org.apache.felix.service.threadio.ThreadIO tio, String profile)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static String` `expand(org.apache.felix.service.command.CommandSession session, String name, String def)`
`static Set<String>` `getCommands(org.apache.felix.service.command.CommandSession session)`
`static Map<String,List<org.jline.builtins.Completers.CompletionData>>` `getCompletions(org.apache.felix.service.command.CommandSession session)`
`Shell.Context` `getContext()`
`static org.jline.reader.ParsedLine` `getParsedLine(org.apache.felix.service.command.CommandSession session)`
`static org.apache.felix.service.command.CommandProcessor` `getProcessor(org.apache.felix.service.command.CommandSession session)`
`static String` `getPrompt(org.apache.felix.service.command.CommandSession session)`
`static org.jline.reader.LineReader` `getReader(org.apache.felix.service.command.CommandSession session)`
`static String` `getRPrompt(org.apache.felix.service.command.CommandSession session)`
`static org.jline.terminal.Terminal` `getTerminal(org.apache.felix.service.command.CommandSession session)`
`Object` `gosh(org.apache.felix.service.command.CommandSession currentSession, String[] argv)`
`void` `help(org.apache.felix.service.command.CommandSession session)`
`void` `help(org.apache.felix.service.command.CommandSession session, String name)`
`static CharSequence` `readScript(URI script)`
`static String` `resolve(org.apache.felix.service.command.CommandSession session, String command)`
`Object` `sh(org.apache.felix.service.command.CommandSession session, String[] argv)`
`Object` `source(org.apache.felix.service.command.CommandSession session, String script)`
`void` `stop()`

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

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

### Field Detail

#### VAR_COMPLETIONS

    public static final String VAR_COMPLETIONS

See Also:
  Constant Field Values

#### VAR_COMMAND_LINE

    public static final String VAR_COMMAND_LINE

See Also:
  Constant Field Values

#### VAR_READER

    public static final String VAR_READER

See Also:
  Constant Field Values

#### VAR_SESSION

    public static final String VAR_SESSION

See Also:
  Constant Field Values

#### VAR_PROCESSOR

    public static final String VAR_PROCESSOR

See Also:
  Constant Field Values

#### VAR_TERMINAL

    public static final String VAR_TERMINAL

See Also:
  Constant Field Values

#### VAR_EXCEPTION

    public static final String VAR_EXCEPTION

See Also:
  Constant Field Values

#### VAR_RESULT

    public static final String VAR_RESULT

See Also:
  Constant Field Values

#### VAR_LOCATION

    public static final String VAR_LOCATION

See Also:
  Constant Field Values

#### VAR_PROMPT

    public static final String VAR_PROMPT

See Also:
  Constant Field Values

#### VAR_RPROMPT

    public static final String VAR_RPROMPT

See Also:
  Constant Field Values

#### VAR_SCOPE

    public static final String VAR_SCOPE

See Also:
  Constant Field Values

#### VAR_CONTEXT

    public static final String VAR_CONTEXT

See Also:
  Constant Field Values

### Constructor Detail

#### Shell

    public Shell(Shell.Context context,
                 org.apache.felix.service.command.CommandProcessor processor)

#### Shell

    public Shell(Shell.Context context,
                 org.apache.felix.service.command.CommandProcessor processor,
                 String profile)

#### Shell

    public Shell(Shell.Context context,
                 org.apache.felix.service.command.CommandProcessor processor,
                 org.apache.felix.service.threadio.ThreadIO tio,
                 String profile)

### Method Detail

#### getContext

    public Shell.Context getContext()

#### getTerminal

    public static org.jline.terminal.Terminal getTerminal(org.apache.felix.service.command.CommandSession session)

#### getReader

    public static org.jline.reader.LineReader getReader(org.apache.felix.service.command.CommandSession session)

#### getProcessor

    public static org.apache.felix.service.command.CommandProcessor getProcessor(org.apache.felix.service.command.CommandSession session)

#### getCompletions

    public static Map<String,List<org.jline.builtins.Completers.CompletionData>> getCompletions(org.apache.felix.service.command.CommandSession session)

#### getCommands

    public static Set<String> getCommands(org.apache.felix.service.command.CommandSession session)

#### getParsedLine

    public static org.jline.reader.ParsedLine getParsedLine(org.apache.felix.service.command.CommandSession session)

#### getPrompt

    public static String getPrompt(org.apache.felix.service.command.CommandSession session)

#### getRPrompt

    public static String getRPrompt(org.apache.felix.service.command.CommandSession session)

#### expand

    public static String expand(org.apache.felix.service.command.CommandSession session,
                                String name,
                                String def)

#### resolve

    public static String resolve(org.apache.felix.service.command.CommandSession session,
                                 String command)

#### readScript

    public static CharSequence readScript(URI script)
                                   throws Exception

Throws:
  `Exception`

#### stop

    public void stop()

#### gosh

    public Object gosh(org.apache.felix.service.command.CommandSession currentSession,
                       String[] argv)
                throws Exception

Throws:
  `Exception`

#### sh

    public Object sh(org.apache.felix.service.command.CommandSession session,
                     String[] argv)
              throws Exception

Throws:
  `Exception`

#### source

    public Object source(org.apache.felix.service.command.CommandSession session,
                         String script)
                  throws Exception

Throws:
  `Exception`

#### help

    public void help(org.apache.felix.service.command.CommandSession session)

#### help

    public void help(org.apache.felix.service.command.CommandSession session,
                     String name)