gsh/command/bindings

The bindings module provides introspection capabilities for the shell’s lexical environment.

It allows users to query the currently active REPL state to see exactly which variables are available in memory, handling both simple assignments and complex pattern-matched destructurings.

Values

pub fn show(bindings: List(binding.Binding)) -> Nil

Renders a formatted, human-readable summary of all active variables currently tracked by the REPL’s state manager.

Output Format:

  • Prints an indented list of variable names or binding patterns.
  • Gracefully handles empty states by printing (none).
  • Appends a summary footer with the total count of active bindings.
Search Document