FullReplAPI

ammonite.repl.FullReplAPI
See theFullReplAPI companion object

Attributes

Companion
object
Graph
Supertypes
trait ReplAPI
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Concrete methods

def help: String

Display help text if you don't know how to use the REPL

Display help text if you don't know how to use the REPL

Attributes

Inherited methods

def _compilerManager: CompilerLifecycleManager

Attributes

Inherited from:
ReplAPI

Attributes

Inherited from:
ReplAPI

History of commands that have been entered into the shell, including previous sessions

History of commands that have been entered into the shell, including previous sessions

Attributes

Inherited from:
ReplAPI
def fullImports: Imports

Shows all imports added that bring values into scope for the commands a user runs; includes imports from the built-in predef and user predef files

Shows all imports added that bring values into scope for the commands a user runs; includes imports from the built-in predef and user predef files

Attributes

Inherited from:
ReplAPI
def height: Int

Current height of the terminal

Current height of the terminal

Attributes

Inherited from:
ReplAPI

History of commands that have been entered into the shell during the current session

History of commands that have been entered into the shell during the current session

Attributes

Inherited from:
ReplAPI
def imports: Imports

Shows the imports added to scope by the commands a user has entered so far; excludes imports from the built-in predef and user predef files

Shows the imports added to scope by the commands a user has entered so far; excludes imports from the built-in predef and user predef files

Attributes

Inherited from:
ReplAPI
def lastException: Throwable

The last exception that was thrown in the REPL; null if nothing has yet been thrown. Useful if you want additional information from the thrown exception than the printed stack trace (e.g. many exceptions have additional metadata attached) or if you want to show the stack trace on an exception that doesn't normally print it (e.g. seeing the stack when a Ctrl-C interrupt happened) via lastException.printStackTrace.

The last exception that was thrown in the REPL; null if nothing has yet been thrown. Useful if you want additional information from the thrown exception than the printed stack trace (e.g. many exceptions have additional metadata attached) or if you want to show the stack trace on an exception that doesn't normally print it (e.g. seeing the stack when a Ctrl-C interrupt happened) via lastException.printStackTrace.

Attributes

Inherited from:
ReplAPI
def load: ReplLoad

Attributes

Inherited from:
ReplAPI
def newCompiler(): Unit

Throw away the current scala.tools.nsc.Global and get a new one

Throw away the current scala.tools.nsc.Global and get a new one

Attributes

Inherited from:
ReplAPI
def pprinter: Ref[PPrinter]

Attributes

Inherited from:
ReplAPI
def sess: Session

Functions that can be used to manipulate the current REPL session: check-pointing progress, reverting to earlier checkpoints, or deleting checkpoints by name.

Functions that can be used to manipulate the current REPL session: check-pointing progress, reverting to earlier checkpoints, or deleting checkpoints by name.

Frames get pushed on a stack; by default, a saved frame is accessible simply by calling load. If you provide a name when saveing a checkpoint, it can later be loaded directly by providing the same name to load

Un-named checkpoints are garbage collected, together with their classloader and associated data, when they are no longer accessible due to restore. Named checkpoints are kept forever; call delete on them if you really want them to go away.

Attributes

Inherited from:
ReplAPI
def show(t: Any, width: Integer, height: Integer, indent: Integer): Unit

Lets you configure the pretty-printing of a value. By default, it simply disables truncation and prints the entire thing, but you can set other parameters as well if you want.

Lets you configure the pretty-printing of a value. By default, it simply disables truncation and prints the entire thing, but you can set other parameters as well if you want.

Attributes

Inherited from:
ReplAPI
def show(t: Any): Unit

Attributes

Inherited from:
ReplAPI
def usedEarlierDefinitions: Seq[String]

If class wrapping is enabled, this lists the names of the previous commands that the current commands actually references (as told by the scalac).

If class wrapping is enabled, this lists the names of the previous commands that the current commands actually references (as told by the scalac).

E.g. in a session like

@ val n = 2
n: Int = 2

@ val p = 1
p: Int = 1

@ n + p
res2: Int = 3

this would have returned an empty list if called from the same line as val n = 2 or val p = 1. This would have returned Seq("cmd0", "cmd1") if called from the same line as n + p, as both cmd0, that defines n, and cmd1, that defines p, are referenced from this line.

Attributes

Inherited from:
ReplAPI
def width: Int

Current width of the terminal

Current width of the terminal

Attributes

Inherited from:
ReplAPI

Concrete fields

lazy val Internal: Internal

This stuff is used for the REPL-generated code that prints things; shouldn't really be used by users, but needs to be public and accessible

This stuff is used for the REPL-generated code that prints things; shouldn't really be used by users, but needs to be public and accessible

Attributes

Inherited fields

val frontEnd: Ref[FrontEnd]

The front-end REPL used to take user input. Modifiable!

The front-end REPL used to take user input. Modifiable!

Attributes

Inherited from:
ReplAPI
val prompt: Ref[String]

Read/writable prompt for the shell. Use this to change the REPL prompt at any time!

Read/writable prompt for the shell. Use this to change the REPL prompt at any time!

Attributes

Inherited from:
ReplAPI

Implicits

Inherited implicits

implicit def codeColorsImplicit: CodeColors

Attributes

Inherited from:
ReplAPI
implicit def tprintColorsImplicit: TPrintColors

Controls how things are pretty-printed in the REPL. Feel free to shadow this with your own definition to change how things look

Controls how things are pretty-printed in the REPL. Feel free to shadow this with your own definition to change how things look

Attributes

Inherited from:
ReplAPI