Interface Expander

All Known Implementing Classes:
DefaultExpander

public interface Expander
The Expander interface provides functionality for expanding special syntax in command lines.

Expanders are responsible for processing and expanding various types of expressions in the input line before it is executed. This includes:

  • History expansions (e.g., !! to repeat the last command)
  • Variable expansions (e.g., $HOME or ${HOME})
  • Other shell-like expansions

The expander is called by the LineReader after the user has accepted a line but before it is executed or added to the history. This allows the user to see the unexpanded form while editing, but ensures that the expanded form is what gets executed and stored in history.

The default implementation is DefaultExpander.

See Also: