git
The community/apps/git directory provides a set of Talon scripts for interacting with Git from the command line. It defines commands, arguments, and convenience functions to make common Git operations faster and easier to use with voice.
The directory contains the following key files:
git_add_patch.talon: This file defines a set of commands to navigate the interactivegit add --patchinterface. It uses single-letter mnemonics common in thegit add --patchinterface (y,n,q,d,a). This provides voice equivalents for common interactive patch selection operations.git.talon: This file provides the core Talon commands for interacting with git. It defines a genericgitcommand that takes a command name from theuser.git_commandlist and a variable number of arguments from theuser.git_argumentlist. It also defines specific commands, such asgit commitandgit stash, that can take a spoken message. It also includes commonly used commands, likegit status,git add patch,git show head, andgit diffto be executed using the$, meaning they require no arguments. Finally, it provides a set of convenience commands using the clipboard or the current selection, such asgit clone clipboard,git diff highlighted, andgit add clipboard.git_argument.talon-list: This file defines theuser.git_argumentlist used ingit.talon. This list provides named arguments such as--amendor--force, as well as branch names that can be used with git commands.git.py: This file defines theuser.git_commandanduser.git_argumentlists used ingit.talon, and a capture rule to allow multiple arguments, so that the command "git commit amend message foo bar" is interpreted as "git commit --amend --message "foo bar"".git_command.talon-list: This file defines theuser.git_commandlist used ingit.talon. It contains most git commands, such asadd,commit,push, andfetch, etc.
These files work together to provide a comprehensive voice interface for Git. The git_command.talon-list and git_argument.talon-list files define the vocabulary of git commands and options. The git.talon file uses these lists to create a flexible system to execute any git command. The git_add_patch.talon file uses single-letter mnemonics to make common interactive patch selection operations faster with voice. The git.py provides the necessary infrastructure to allow the use of user defined lists and arguments to be used in git.talon.