shell-command README
A VSCode extension that allow user to run shell commands on selected text in the editor.
Features
- You can call any command that is available in your shell.
- You can run a command when selecting nothing, the command output will be print at the pointer (side effect).
- The previously ran command is remembered, so that you don't have to enter again.
- If you execute some commands frequetnly, you can create a shortcut for it, pass the command line to be executed as "command" argument.
- Ctrl-Shift-P > Keyboard shortcut JSON
- Add a new entry like below, replace "key" with the key you want and "command" with command you want to execute.
{
"key": "alt+t", // whatever you want for a keybinding
"command": "shell-command.execute",
"args": {
"command": "gawk -F' ' '{print $9 \"\t\t\t\" $5}'"
}
}
- Some examples of how to use the tool is shown below:
Sed command example (filter line)
Sort command example
Gawk command example
Requirements
The command you want to run must be available in your shell.
Release Notes
1.0.0
Initial release.
Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
| |