Class

grizzled.cmd

HistoryHandler

Related Doc: package cmd

Permalink

class HistoryHandler extends CommandHandler

Simple history command handler.

A simple "history" (alias: "h") handler that displays the history to standard output. This history handler supports the following usage:

history [n]

Where n is the number of (most recent) history entries to show. If absent, n defaults to the size of the history buffer.

This handler is not installed by default. It is provided as a convenience, for command interpreters to use if desired.

Linear Supertypes
CommandHandler, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HistoryHandler
  2. CommandHandler
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HistoryHandler(cmd: CommandInterpreter)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val CommandName: String

    Permalink

    The name of the command.

    The name of the command. This name, or any of the aliases (see below) will cause the command to be invoked.

    Definition Classes
    HistoryHandlerCommandHandler
  5. val Help: String

    Permalink

    The help for this command.

    The help for this command. The help string is written as is to the screen. It is not wrapped, indented, or otherwise reformatted. It may be a single string or a multiline string.

    Definition Classes
    HistoryHandlerCommandHandler
  6. val aliases: List[String]

    Permalink

    Additional aliases for the command, if any.

    Additional aliases for the command, if any.

    Definition Classes
    HistoryHandlerCommandHandler
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val cmd: CommandInterpreter

    Permalink
  10. def commandNameCompletions(prefix: String): List[String]

    Permalink

    Compares a prefix string to this command name and its aliases, to determine whether the prefix string could possibly be completed by the name or aliases.

    Compares a prefix string to this command name and its aliases, to determine whether the prefix string could possibly be completed by the name or aliases. This method is obviously used to facilitate tab-completion. The default implementation of this method simply forces both strings to lower case before performing a substring comparison between them. Overridden definitions of this method can apply other matching criteria.

    prefix

    the prefix to compare

    returns

    a list of the strings (name and/or aliases) that could be completed by prefix, or Nil.

    Definition Classes
    CommandHandler
  11. def complete(token: String, context: List[CompletionToken], commandLine: String): List[String]

    Permalink

    Perform completion on the command, returning the possible completions.

    Perform completion on the command, returning the possible completions. This method has the exact same interface and use as the complete() method in grizzled.readline.Completer. Please see that trait for full documentation.

    token

    the token being completed

    context

    the token context (i.e., list of parsed tokens, with cursor)

    commandLine

    the current unparsed input line, which includes the token

    Definition Classes
    CommandHandler
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. val hidden: Boolean

    Permalink

    Whether or not the command is hidden.

    Whether or not the command is hidden. Hidden commands don't show up in the help list or the history. Using the HiddenCommandHandler trait saves a lot of work.

    Definition Classes
    CommandHandler
  18. val history: History

    Permalink
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def matches(candidate: String): Boolean

    Permalink

    Compares a command name (that the user typed in, for instance) to this command's name.

    Compares a command name (that the user typed in, for instance) to this command's name. The default implementation of this method simply forces both names to lower case before comparing them. Overridden definitions of this method can apply other matching criteria.

    candidate

    the candidate name to be compared with this one

    returns

    true if they match, false if not

    Definition Classes
    CommandHandler
  21. def moreInputNeeded(lineSoFar: String): Boolean

    Permalink

    This method is called after a line is read that matches this command, to determine whether more lines need to be read to finish the command.

    This method is called after a line is read that matches this command, to determine whether more lines need to be read to finish the command. The default implementation returns false, meaning a single input line suffices for the entire command. Implementing classes or objects can override this method to ensure that the command has a required terminating character (e.g., a ";"), doesn't end with a line continuation character (e.g., "\"), or whatever the syntax requires.

    lineSoFar

    the line read so far

    Definition Classes
    CommandHandler
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def runCommand(commandName: String, unparsedArgs: String): CommandAction

    Permalink

    Handle the command.

    Handle the command. The first white space-delimited token in the command string is guaranteed to match the name of this command, by the rules of the matches() method.

    unparsedArgs

    the remainder of the unparsed command line

    returns

    KeepGoing to tell the main loop to continue, or Stop to tell the main loop to be done.

    Definition Classes
    HistoryHandlerCommandHandler
  26. val storeInHistory: Boolean

    Permalink

    Whether or not the command should be put in the history.

    Whether or not the command should be put in the history.

    Definition Classes
    CommandHandler
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from CommandHandler

Inherited from AnyRef

Inherited from Any

Ungrouped