Module shell

Module shell 

Source
Expand description

§Interactive Shell Mode

This module implements an interactive shell for vapor-cli, providing a different mode of operation from the SQL REPL. The shell allows users to run standard system commands and a few built-in commands, all while maintaining the context of the connected database.

§Features:

  • System Command Execution: Run any command available in the system’s PATH.
  • Built-in Commands: Includes cd, pwd, history, and help.
  • Database Context: The shell is aware of the connected database, which can be referenced via .dbinfo.
  • REPL Integration: Seamlessly switch back to the SQL REPL using the .vrepl command.
  • Command Completion: Provides basic completion for built-in commands and file paths.
  • Persistent History: Saves shell command history across sessions.

Structs§

Shell
Represents the state of the interactive shell.

Enums§

ShellAction
Defines the possible actions that can be returned from the shell session. This is used to signal whether the user wants to exit the application entirely or switch back to the SQL REPL.

Functions§

shell_mode
Starts the interactive shell mode.