Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Scepheo committed Jun 18, 2019
1 parent 6927977 commit 81afc24
Showing 1 changed file with 64 additions and 14 deletions.
78 changes: 64 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
]
}
```
Expand All @@ -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.
Expand Down Expand Up @@ -121,3 +123,51 @@ generated by going to <https://github.com/settings/tokens>.

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.

0 comments on commit 81afc24

Please sign in to comment.