Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConsoleHistory

A console history manager object.

Hierarchy

  • ConsoleHistory

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Private _cursor

_cursor: number

Private _history

_history: string[]

Private _kernel

_kernel: IKernel

Accessors

isDisposed

  • get (): boolean
  • Get whether the console history manager is disposed.

    Notes

    This is a read-only property.

    Returns boolean

kernel

  • get (): IKernel
  • set (newValue: IKernel): void
  • The current kernel supplying navigation history.

    Returns IKernel

  • The current kernel supplying navigation history.

    Parameters

    • newValue: IKernel

    Returns void

Methods

back

  • back(): Promise<string>
  • Get the previous item in the console history.

    Returns Promise<string>

    A Promise for console command text or undefined if unavailable.

dispose

  • dispose(): void

forward

  • forward(): Promise<string>

push

  • push(item: string): void
  • Add a new item to the bottom of history.

    Parameters

    • item: string

      The item being added to the bottom of history.

      Notes

      If the item being added is undefined or empty, it is ignored. If the item being added is the same as the last item in history, it is ignored as well so that the console's history will consist of no contiguous repetitions. This behavior varies from some shells, but the Jupyter Qt Console is implemented this way.

    Returns void

Generated using TypeDoc