-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRepositoryActions.json
More file actions
145 lines (138 loc) · 6.13 KB
/
RepositoryActions.json
File metadata and controls
145 lines (138 loc) · 6.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Define your repository context actions for RepoZ with this file (changes require an app restart).
# COMMUNITY
# ==========
#
# Please visit the following repository to find help, ask questions and browse repository actions
# for 3rd party apps others might already have posted:
#
# https://github.com/awaescher/RepoZ-RepositoryActions
# Don't forget to leave a star ;)
#
# If you have created your own repository actions, please consider to share them with the community
# by submitting a pull-request.
#
# Thank you <3
# HOW TO USE
# ===========
#
# This file can be used to define repository actions and actions based on the file extensions inside of given repositories,
# so called file associations.
# Let's start ...
#
# Repository actions
# ------------------
#
# Repository actions are actions for the repository context menu in RepoZ. They always refer to the repository they are invoked with.
# Each repository action is defined in an own json block defining its name, action on invocation and more.
#
# Example
# {
# "name": "{OpenIn} Terminal", // {OpenIn} is a placeholder, see "Noteworthy"
# "command": 'open',
# "executables": ['/path/to/app1', '/path/to/app2'],
# "arguments": '-b com.apple.terminal "{Repository.Path}"',
# "keys": "Command+Shift+T",
# "active": "true"
# }
#
# Use either 'command' or 'executables'. If both are defined, 'command' will always be preferred.
#
# - Commands will not be validated, RepoZ is going to execute it blindly with the given arguments.
# This is useful for system commands like 'start' on Windows or 'open' on macOS or other global command line tools.
# - Executables will be validated with File.Exists() and might not be visible in RepoZ if none of the defined executables are available.
# This is useful if an application is known to be located in different folders (like Visual Studio Code) and require probing.
#
# Try to avoid absolute paths if possible by using environment variables like %PROGRAMFILES% or %APPDATA%, for example.
# On Windows: Run 'SET' in cmd.exe to see the list of environment variables you can use.
#
# Use the placeholders below to build repository actions with information of the corresponding repository.
# RepoZ will replace the placeholders automatically.
#
# PLACEHOLDER EXAMPLE
# {Repository.Name} RepoZ
# {Repository.Path} (prefer SafePath) C:\Develop\RepoZ\ (Windows) or /Users/awaescher/Developer/RepoZ/ (macOS)
# {Repository.Location} C:\Develop (Windows) or /Users/awaescher/Developer (macOS)
# {Repository.SafePath} C:/Develop/RepoZ (Windows) or /Users/awaescher/Developer/RepoZ (macOS)
# {Repository.CurrentBranch} feature/CustomizableContextMenu
# {Repository.Branches} master|feature/CustomizableContextMenu|origin/HEAD|origin/master|origin/feature/CustomizableContextMenu
# {Repository.LocalBranches} master|feature/CustomizableContextMenu
# {Repository.RemoteUrls} https://github.com/awaescher/repoz
#
#
# File associations
# ------------------
#
# File associations are different to repository actions. They are not related to the repository itself but define a file pattern
# like "*.sln" which RepoZ uses to scan for files recursively. Matching files will be listed in a separate sub menu named after
# the file association itself.
# File associations don't support the repository placeholders from above. The only placeholder is the path of the matching files
# which can be referred to as {FilePath}.
#
# Example
# {
# "name": "{Open} Visual Studio solutions", // {OpenIn} is a placeholder, see "Noteworthy"
# "extension": "*.sln",
# "command": 'open',
# "arguments": '"{FilePath}"',
# "active": "true"
# }
#
# NOTEWORTHY
# ===========
#
# - You might want to use the placeholders {Open}, {OpenIn} & {OpenWith} for the repository action and file association names,
# this allows RepoZ to translate "Open ..." to the user's language. The remaining part of the name will be moved at the correct location.
# - {Repository.Path}, {Repository.SafePath} and {Repository.Location} will NOT be wrapped in quotes by default, because some apps require different escape characters.
# - The first action will automatically get the Shortcut [Return], the second [Ctrl+Return]/[Command+Return] in addition to the shortcuts defined.
# - Recursive file scans for the file associations might be time consuming. Therefore, RepoZ will not scan for files unless the sub menu
# of the corresponding file association gets expanded. This way, RepoZ makes sure that the context menu won't become sluggish.
{
"repository-actions":
[
{
"name": "{OpenIn} Finder",
"command": "open",
"arguments": '"{Repository.SafePath}"',
"keys": "Command+Shift+F",
"active": "true"
},
{
"name": "{OpenIn} Terminal",
"command": "open",
"arguments": '-b com.apple.terminal "{Repository.Path}"',
"keys": "Command+Shift+T",
"active": "true"
},
{
"name": "{OpenIn} Visual Studio Code",
"executables": ['/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code'],
"arguments": '"{Repository.SafePath}"',
"keys": "Command+Shift+C",
"active": "true"
},
{
# Requires installation of the GitHub Command Line Tool on macOS (available in the GitHub Desktop main menu)
"name": "{OpenIn} GitHub Desktop",
"command": "github",
"arguments": '"{Repository.SafePath}"',
"active": "true"
}
],
"file-associations":
[
{
"name": "{Open} Visual Studio solutions",
"extension": "*.sln",
"command": "open",
"arguments": '"{FilePath}"',
"active": "true"
},
{
"name": "{Open} Xcode projects",
"extension": "*.xcodeproj",
"command": "open",
"arguments": '"{FilePath}"',
"active": "true"
}
]
}