diff --git a/readme.md b/readme.md index 09439e1..9031a52 100644 --- a/readme.md +++ b/readme.md @@ -34,8 +34,6 @@ An example config file for someone named "John Smith" with the Windows username ``` json { "RepositoryFolder": "C:/Users/SmithJ/Source/Repos", - "VsCodePath": "C:/Users/SmithJ/AppData/Local/Programs/Microsoft VS Code/Code.exe", - "GitBashPath": "C:/Program Files/Git/git-bash.exe", "AzureProviders": [ { "Organization": "contoso", @@ -56,6 +54,22 @@ An example config file for someone named "John Smith" with the Windows username "user.name": "John" } } + ], + "Actions": [ + { + "Name": "Open folder", + "Program": "{directory}", + "SearchFilter": ".git", + "Shell": true + }, + { + "Name": "Git Bash", + "Program": "C:\\Program Files\\Git\\git-bash.exe", + "Args": [ + "--cd={directory}" + ], + "SearchFilter": ".git" + } ] } ``` @@ -66,18 +80,6 @@ Path to the folder that contains all your git repositories. Defaults to `%USERPROFILE%/Source/Repos`, which is the default clone location used by Visual Studio. -### VsCodePath - -Path to your installation of Visual Studio Code. Defaults to -`%USERPROFILE%/AppData/Local/Programs/Microsoft VS Code/Code.exe`, which is the -default location of a user installation of Visual Studio Code. - -### GitBashPath - -Path to your installation of Git Bash. Defaults to -`C:/Program Files/Git/git-bash.exe`, which is where Git for Windows installs Git -Bash by default. - ### AzureProviders Array of Azure DevOps remotes. These will be available to clone from. @@ -121,3 +123,51 @@ generated by going to . Keys and values for git config that should be applied to any repositories cloned from this provider. Can be used to e.g. set your personal email. + +### Actions + +Array of actions you can take on a repository. By default, it provides actions +for opening the directory, opening a solution file, starting git bash (if found) +and opening the folder in Visual Studio Code (if found). + +It will generate actions for each item found in the repository that matches the +search filter. Then, for each item found, it will apply some substitutions to +the `Name`, `Program` and `Args` properties: + +| original | replaced with | +|----------|---------------| +| `{name}` | The name of the item, e.g. `readme.md` | +| `{path}` | The full path to the item, e.g. , e.g. `C:\Repos\MyRepo\readme.md` | +| `{directory}` | The full path of the directory containing the item, e.g. `C:\Repos\MyRepo` | + +#### Actions - Name + +The name that will be used as the label for the action. + +#### Actions - Program + +The program to execute for the action. Can also be a path to a file or directory +which will be opened with the default program if `Shell` is set. + +#### Actions - Args + +Arguments that will be provided to the program. Note that these will be quoted +individually, so to execute the command `program.exe --option value`, you need +to specify the option and value seperately: + +``` json +{ + "Args": [ "--option", "value" ] +} +``` + +#### Actions - SearchFilter + +Windows search filter that will be used to find the items the action operates +on. For actions that operate on the main repository folder itself, this should +(probably) be `.git` (see example config). + +#### Actions - Shell + +Whether to execute the command as a shell command. Useful to open a file or +directory with the default program, or for more complex commands.