InlineShell
sublime里选中任意文本执行命令
Details
Installs
- Total 0
- Win 0
- Mac 0
- Linux 0
| Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
InlineShell
Run shell commands inline in Sublime Text, with streaming output and history completion.
Features
- Run the current line or selected text as a shell command
- Pipe selected text into a command using a trailing
|command - Stream output inline, without blocking the editor
- History completion for previously run commands
- Confirmation prompt for dangerous commands
- Blocks interactive commands that require a real terminal
Install
Package Control
Search for InlineShell in Package Control (once the package is accepted).
Manual
- Open Sublime Text
- Menu:
Preferences->Browse Packages... - Create a folder named
InlineShell - Copy the plugin files into that folder
Usage
Run a command
- Type a command, for example
ls -la - Run the command palette entry
Inline Shell: Run Line or Selection - Output appears on the next line
Run a selection
Select any text and run Inline Shell: Run Line or Selection.
Pipe selection into a command
Select content that ends with a pipe command:
{"name": "test", "value": 123}
|grep name
Or use an inline pipe:
{"name": "test"} |grep name
History completion
Run Inline Shell: History Complete to pick a previous command.
Key bindings
This package does not define default key bindings to avoid overriding Sublime defaults. Add your own in your user keymap if you want them. Example:
[
{"keys": ["super+enter"], "command": "run_command_run_line"},
{"keys": ["ctrl+tab"], "command": "run_command_history_complete"}
]
Shell aliases
If you want custom aliases or PATH entries, create a lightweight shell rc file:
zsh: ~/.zshrc_lite
alias ll='ls -la'
alias g='git'
export PATH="$HOME/.local/bin:$PATH"
bash: ~/.bashrc_lite
alias ll='ls -la'
Blocked commands
The following interactive commands are blocked and will prompt you to use a terminal:
vim,vi,nanotop,htopless,more,manwatch
Dangerous command protection
Commands like these require confirmation:
rm -rf,rm -fsudo rmdd of=/dev/...mkfschmod 777 /shutdown,reboot
Requirements
- Sublime Text 4
- macOS or Linux
- zsh or bash
License
MIT