Class InteractiveShell
  
  
  
    Inheritance
    
    InteractiveShell
   
  
  
  
  Assembly: SociallyDistant.Framework.dll
  Syntax
  
    public class InteractiveShell : ITerminalProcessController, ICommandShell, IAutoCompleteSource, IScriptExecutionContext
   
  Constructors
  
  InteractiveShell(IScriptExecutionContext)
  
  
  Declaration
  
    public InteractiveShell(IScriptExecutionContext context)
   
  Parameters
  
  Properties
  
  FileSystem
  Gets a reference to the shell's file system. If null, glob patterns won't be expanded.
Declaration
  
    public IVirtualFileSystem? FileSystem { get; }
   
  Property Value
  
  
  HandleExceptionsGracefully
  
  
  Declaration
  
    public bool HandleExceptionsGracefully { get; set; }
   
  Property Value
  
  
  Home
  Gets a path to the user's home directory. If null, there is no home directory and '~' characters will not be expanded to it.
Declaration
  
    public string? Home { get; }
   
  Property Value
  
  
  IsExecutionHalted
  
  
  Declaration
  
    public bool IsExecutionHalted { get; }
   
  Property Value
  
  
  ParserOptions
  
  
  Declaration
  
    public ShellParseOptions ParserOptions { get; }
   
  Property Value
  
  
  Title
  
  
  Declaration
  
    public string Title { get; }
   
  Property Value
  
  
  UseLegacyParser
  
  
  Declaration
  
    public bool UseLegacyParser { get; set; }
   
  Property Value
  
  
  WorkingDirectory
  Gets a path to the current working directory. If none is specified, "/" will be used instead.
Declaration
  
    public string? WorkingDirectory { get; }
   
  Property Value
  
  Methods
  
  DeclareFunction(string, IScriptFunction)
  
  
  Declaration
  
    public void DeclareFunction(string name, IScriptFunction body)
   
  Parameters
  
  
  GetCompletions(StringBuilder, out int)
  
  
  Declaration
  
    public IReadOnlyList<string> GetCompletions(StringBuilder text, out int insertionPoint)
   
  Parameters
  
  Returns
  
  
  GetVariableValue(string)
  
  
  Declaration
  
    public string GetVariableValue(string name)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | string | name |  | 
    
  
  Returns
  
  
  HandleCommandNotFound(string, string[], IConsoleDriver)
  
  
  Declaration
  
    public void HandleCommandNotFound(string name, string[] args, IConsoleDriver console)
   
  Parameters
  
  
  OpenFileConsole(IConsoleDriver, string, FileRedirectionType)
  
  
  Declaration
  
    public IConsoleDriver OpenFileConsole(IConsoleDriver realConsole, string filePath, FileRedirectionType mode)
   
  Parameters
  
  Returns
  
  
  ParseScript(string)
  
  
  Declaration
  
    public ShellInstruction ParseScript(string scriptText)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | string | scriptText |  | 
    
  
  Returns
  
  
  ProcessBuiltIn(ISystemProcess, ITextConsole, string, string[])
  
  
  Declaration
  
    public bool ProcessBuiltIn(ISystemProcess process, ITextConsole console, string name, string[] arguments)
   
  Parameters
  
  Returns
  
  
  Run(IConsoleDriver)
  
  
  Declaration
  
    public Task Run(IConsoleDriver console)
   
  Parameters
  
  Returns
  
  
  RunParsedScript(ShellInstruction, IConsoleDriver?)
  
  
  Declaration
  
    public Task<int> RunParsedScript(ShellInstruction scriptTree, IConsoleDriver? console = null)
   
  Parameters
  
  Returns
  
  
  RunScript(IConsoleDriver, string)
  
  
  Declaration
  
    public Task RunScript(IConsoleDriver console, string scriptText)
   
  Parameters
  
  Returns
  
  
  RunScript(string)
  
  
  Declaration
  
    public Task RunScript(string scriptText)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | string | scriptText |  | 
    
  
  Returns
  
  
  SetVariableValue(string, string)
  
  
  Declaration
  
    public void SetVariableValue(string name, string newValue)
   
  Parameters
  
  
  TryExecuteCommandAsync(string, string[], IConsoleDriver, IScriptExecutionContext?)
  
  
  Declaration
  
    public Task<int?> TryExecuteCommandAsync(string name, string[] args, IConsoleDriver console, IScriptExecutionContext? callSite = null)
   
  Parameters
  
  Returns
  
  Implements