Shell Turtlestein
Plugin for running arbitrary shell commands in Sublime Text
Details
Installs
- Total 33K
- Win 17K
- Mac 10K
- Linux 6K
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 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 1 | 1 | 0 | 2 | 3 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 1 | 3 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 2 | 0 | 0 | 1 | 0 |
Mac | 0 | 1 | 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 | 1 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Shell Turtlestein
A quick and simple way to run arbitrary shell commands in Sublime Text.
Mr. Turtlestein acts as a more flexible alternative to Sublime's build systems. Commands run in your project's directory:
And display their output just like Sublime's build systems:
Input and output
Unix's familiar |
and >
operators can be used to pipe/redirect a command's
input and output:
- To pipe the active view's selections to a command, add a leading pipe
character (e.g.
| sort
). If there are no non-empty selections the entire file will be piped to the command. - To pipe a command's output back into the view, add a trailing pipe
character (e.g.
| sort |
). - To redirect the command's output to a new file, add a trailing greater than
symbol to the command (e.g
ls >
or| sort >
).
Using snippets
Snippets are available for frequently used commands. All snippets with the
scope name source.shell
(source.dosbatch
for Windows users) can be used in
the prompt shown above. I have
some examples
you can take a look at to get an idea for this.
Default keybindings
- Ctrl + Shift + C (Cmd + Shift + C): prompt for a shell command
- Ctrl + Alt + Shift + C (Cmd + Alt + Shift + C): launch a terminal in the window's directory
- Ctrl + Shift + X (Cmd + Shift + X): re-run the previous command
Optional Configuration
In your own Packages/User/Shell Turtlestein.sublime-settings
file you can
override the following settings:
surround_cmd
: A two-element array that specifies text to append before and after the command (e.g.["source ~/.profile && ", ""]
).exec_args
: The arguments that will be passed toExecCommand
. The same options that are available to build systems are available here, butfile_regex
,line_regex
,encoding
,env
, andpath
are the only options that make sense to use with this plugin. Arguments specified in thecmd_settings
(see below) will override these defaults.cmd_settings
: An array of configurations to use for commands that are executed. The first configuration to match the command being run will be used. The keys that each configuration should have are:cmd_regex
: A regex that must match the command for this configuration for this configuration to be used.exec_args
andsurround_cmd
override the settings described above for any matching command.
prefer_active_view_dir
: If set to true, prefer using the directory of active file over using a folder open in the current project.
PAQ
Q: Who the balls is Shell Turtlestein?
A: He was a pet turtle that died in some episode of Modern Family. That's about as high-brow as my references get. R.I.P. Shell :(
Q: What does “PAQ” stand for?
A: Possibly asked questions
Thanks!
Thanks to all the contributors. I'd give you all high fives if my arm would fit through the internet.