Visual Studio Code Extension. Levarage your favourite shell commands to edit text
MIT License
Leverage your favourite shell commands to edit text.
ES_SELECTED
.Feature requests and bug reports are very welcome: https://github.com/ryu1kn/vscode-edit-with-shell/issues
A couple of requests from me when you raise an github issue.
EditWithShell: Run command
(Command ID: editWithShell.runCommand
)
Show command history and let you select, modify & run a command
EditWithShell: Clear Command History
(Command ID: editWithShell.clearCommandHistory
)
Clear command history
EditWithShell: Run quick command 1
(Command ID: editWithShell.runQuickCommand1
)
Run quick command 1. You have quick commands up to 5, i.e. editWithShell.runQuickCommand5
editWithShell.currentDirectoryKind
(default: "currentFile"
)
Current directory for shell commands. If the target directory is not available, HOME directory will be used. Possible values: currentFile
or workspaceRoot
editWithShell.processEntireTextIfNoneSelected
(default: false
)
Pipe the entire text to the shell command if no text is selected
editWithShell.favoriteCommands
(default: []
)
List of commands that can be activated by quick commands. Each element must have a command ID and command. e.g:
"editWithShell.favoriteCommands": [
{
"id": "extract-email-and-sort-on-address-book",
"command": "cut -d, -f3 | sort"
},
{
"id": "insert-melbourne-time",
"command": "TZ=Australia/Melbourne date '+%Y-%m-%dT%H:%M:%S'"
},
...
]
editWithShell.quickCommand1
(default: ""
)
ID of a favorite command triggered with quick command 1. e.g. "insert-melbourne-time"
of favoriteCommands
config value example.
You have quick commands up to 5, i.e. editWithShell.quickCommand5
.
editWithShell.shell.linux
(default: "/bin/sh"
)
The path of the shell that this extension uses on Linux
editWithShell.shellArgs.linux
(default: ["-c"]
)
Arguments to the shell to be used on Linux
editWithShell.shell.osx
(default: "/bin/sh"
)
The path of the shell that this extension uses on macOS
editWithShell.shellArgs.osx
(default: ["-c"]
)
Arguments to the shell to be used on macOS
editWithShell.shell.windows
(default: "cmd.exe"
)
The path of the shell that this extension uses on Windows
"pwsh"
"wsl"
editWithShell.shellArgs.windows
(default: ["/d", "/s", "/c"]
)
Arguments to the shell to be used on Winows
["-NoLogo", "-NoProfile", "-Command"]
["bash", "-c"]
You can quickly open a command input box by registering the extension command to your keyboard shortcut settings. For example:
{ "key": "ctrl+r ctrl+r", "command": "editWithShell.runCommand",
"when": "editorTextFocus && !editorReadonly" },
{ "key": "ctrl+r ctrl+1", "command": "editWithShell.runQuickCommand1",
"when": "editorTextFocus && !editorReadonly" },