Class DefaultExpander

java.lang.Object
org.jline.reader.impl.DefaultExpander
All Implemented Interfaces:
Expander

public class DefaultExpander extends Object implements Expander
Default implementation of the Expander interface.

This expander provides functionality for expanding special syntax in command lines, including:

  • History expansions (e.g., !!, !$, !n, etc.)
  • Variable expansions (e.g., $HOME, ${PATH})

The history expansion syntax is similar to that used in Bash and other shells, allowing users to reference and reuse previous commands or parts of commands.

The expander is used by the LineReader to process the command line after the user has accepted it but before it is executed or added to the history.

See Also: