commandbox.system.modules_app.system-commands.commands

Class repl

lucee.Component
    extended by commandbox.system.modules_app.system-commands.commands.repl

The REPL (Read-Eval-Print-Loop) command allows you to write and execute a-la-carte CFML code right in your console. Variables set in will be available on subsequent lines. . {code:bash} repl {code} . By default we surround your code in a 'cfscript' tag, but you can also use the 'script=false' argument to use the REPL console in tag mode. . {code:bash} repl --!script {code} . The REPL has a separate command history for scripts and tags. Use the up-arrow to look at previous lines in the history. The REPLs histories can be managed by the "history" command.

Class Attributes:
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any REPLParser


    • access = public
    • returntype = any
    • inject = REPLParser
    true false
    any REPLScriptHistoryFile


    • access = public
    • returntype = any
    • inject = REPLScriptHistoryFile@constants
    true false
    any REPLTagHistoryFile


    • access = public
    • returntype = any
    • inject = REPLTagHistoryFile@constants
    true false
    any commandHistoryFile


    • access = public
    • returntype = any
    • inject = commandHistoryFile@constants
    true false
    Method Summary
    private any determineVariableType([any contents])
         Returns variable type if it can be determined.
    private any resetShell()
    any run([string input], [boolean script='true'], [string directory=''])
     
    Methods inherited from class lucee.Component
    None

    Property Detail

    REPLParser

    property any REPLParser

    Attributes:
    access - public
    required - false
    returntype - any
    inject - REPLParser
    serializable - true

    REPLScriptHistoryFile

    property any REPLScriptHistoryFile

    Attributes:
    access - public
    required - false
    returntype - any
    inject - REPLScriptHistoryFile@constants
    serializable - true

    REPLTagHistoryFile

    property any REPLTagHistoryFile

    Attributes:
    access - public
    required - false
    returntype - any
    inject - REPLTagHistoryFile@constants
    serializable - true

    commandHistoryFile

    property any commandHistoryFile

    Attributes:
    access - public
    required - false
    returntype - any
    inject - commandHistoryFile@constants
    serializable - true

    Method Detail

    determineVariableType

    private any determineVariableType([any contents])

    Returns variable type if it can be determined

    Parameters:
    contents

    resetShell

    private any resetShell()


    run

    public any run([string input], [boolean script='true'], [string directory=''])

    Parameters:
    input - Optional CFML to execute. If provided, the command exits immediatley.
    script - Run REPL in script or tag mode
    directory - Directory to start the REPL in (defaults to current working directory).