Skip to content

talon_repl

The community/apps/talon/talon_repl directory provides functionality for interacting with the Talon REPL (Read-Eval-Print Loop). It defines a Talon application, and a set of commands for inspecting and manipulating the Talon runtime environment.

The file talon_repl.py defines a Talon application named talon_repl. This application is matched when a window title contains either "Talon - REPL" or ".talon/bin/repl". Additionally, this file sets the code language for this application to Python.

The file talon_repl.talon defines the voice commands available within the talon_repl application. It also adds the tags user.talon_python and user.readline, which are used to enable Python-specific and readline-specific features. Notably, it includes a number of debugging commands which can be used to inspect the state of the Talon runtime. These commands use the sim command to send commands to the REPL and the user.talon_pretty_print action to format the output. The debug commands are:

  • test last: Repeats the last command.
  • test <phrase>: Repeats a given phrase.
  • test numb <number_small>: Repeats a command from history by index.
  • debug action {user.talon_actions}: Prints details about a given Talon action. Note: this command and the following commands depend on the user.talon_populate_lists tag, which is commented out by default.
  • debug list {user.talon_lists}: Prints the contents of a given Talon list.
  • debug tags: Prints all active tags.
  • debug settings: Prints all Talon settings.
  • debug modes: Prints the current Talon modes.
  • debug scope {user.talon_scopes}: Prints a given scope.
  • debug running apps: Prints a list of currently running apps.
  • debug all windows: Prints a list of all windows.
  • debug {user.running} windows: Prints debug information about windows belonging to a given app.