Bracktes extension that allow develper add dynamically hotkeys for command line tools.
- Install Brackets Sprint 36 or later.
- In Brackets, click the menu item File > Extension Manager...
- Go to the "Available" tab of the dialog that appears.
- Type "Command Runner" in the search box.
- Click the "Install" button in the search result for Command Runner.
Create a file "cmdrunner.json" inside of your project folder. Use cmdrunner.json of this project as example.
The file cmdrunner.json is a JSON file that contains the configuration of commands. Must contains a array with command objects. The command object has follwing structure:
{
"label": "string",
"cmd": "string",
"args": [ array ],
"key": "string",
"opts": {
"defaultPath": "string",
"hiddenConsole": bool,
"killCmd": "string",
"closeStdin": bool
}
}
Following is a description of each attribute:
label: Label that show in menus and quick search.
cmd: Command that will be executed. You can use $0, $1, ... $n to specify custom arguments, that will be prompted for user.
args: Array that contains default arguments, in case user supply anything.
key: Hotkey that will perform a quick access to command.
splitChar: Specify the char that will separate arguments of command. Default value is ':'.
opts: Optional attributes that configure some options of execution environment.
opts.defaultPath: Directory path where command will executed.
opts.hiddenConsole: True indicates that output panel will not open after command execution.
opts.killCmd: Command that will be triggered by 'Kill Commands' menu option.
opts.closeStdin: Closes the stdin of the child processes, which will generally forc it into non-interactive mode. Defaults to true.
System Parameters: Reserved variables that can be used to compose commands.
$selectedFile Path to selected file.
$dirOfSelectedFile Path to directory of selected file.
$projectDir Path directory of project.
Features: - Accepted pull request to work in OSX. - Add new option splitChar.
Features:
- Add killCmd option on configuration.
Features:
- Color on output (thanks for partageit suggestion).
Features:
- Specific menu "Commands"
- Kill commands menu option
- Show panel menu option
- Hide panel menu option
- Clear panel menu option
- Add extra option hiddenConsole.
Bugfixes:
- Fix output update on panel output.
Command Runner is released under the MIT license.