Shelly
Edit any text in seconds. Press the hotkey, enter the pipeline, and press the Enter key.
Features
- Edit selected text using shell commands.
- Selected text is available as a "VS_SELECTED" environment variable.
- Keeps a history of the commands you've used, which you can edit and reuse.
- Use any shell: zsh, bash, sh? You name it!
- Register up to 5 keyboard shortcuts that can be invoked using keyboard shortcuts.
Request Features!
This is my first VSCode extension, so I would appreciate any feedback you can give me! Post an issue on GitHub.
Commands
Shelly: Run command (Command ID: shelly.runCommand )
Show command history and let you select, modify & run a command
Shelly: Clear Command History (Command ID: shelly.clearCommandHistory )
Clear command history
Shelly: Run quick command 1 (Command ID: shelly.runQuickCommand1 )
Run quick command 1. You have quick commands up to 5, i.e. shelly.runQuickCommand5
Configurations
shelly.currentDirectoryKind (default: "currentFile" )
Current directory for pipelines. If the target directory is not available, HOME directory will be used. Possible values: currentFile or workspaceRoot
shelly.processEntireTextIfNoneSelected (default: false )
Pipe the entire text to the pipeline if no text is selected
shelly.favoriteCommands (default: [] )
List of commands that can be activated by quick commands. Each element must have a command ID and command. e.g:
"shelly.favoriteCommands": [
{
"id": "sort-by-human-readable-size",
"command": "sort -h"
},
{
"id": "unix-ts",
"command": "date +%s"
},
...
]
shelly.quickCommand1 (default: "" )
ID of a favorite command triggered with quick command 1. e.g. "unix-ts" of favoriteCommands config value example.
You can add up to five quick commands, i.e. shelly.quickCommand5 .
shelly.shell.linux (default: "/bin/sh" )
The path of the shell that this extension uses on Linux
shelly.shellArgs.linux (default: ["-c"] )
Arguments to the shell to be used on Linux
shelly.shell.osx (default: "/bin/sh" )
The path of the shell that this extension uses on macOS
shelly.shellArgs.osx (default: ["-c"] )
Arguments to the shell to be used on macOS
shelly.shell.windows (default: "cmd.exe" )
The path of the shell that this extension uses on Windows
- For PowerShell, you may set this to
"pwsh"
- For Bash on WSL (Windows Subsystem for Linux), you may set this to
"wsl"
shelly.shellArgs.windows (default: ["/d", "/s", "/c"] )
Arguments to the shell to be used on Winows
- For PowerShell, you may set this to
["-NoLogo", "-NoProfile", "-Command"]
- For Bash on WSL (Windows Subsystem for Linux), you may set this to
["bash", "-c"]
Keyboard Shortcuts
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": "shelly.runCommand",
"when": "editorTextFocus && !editorReadonly" },
{ "key": "ctrl+r ctrl+1", "command": "shelly.runQuickCommand1",
"when": "editorTextFocus && !editorReadonly" },
| |