ctrl+shift+p filters: :st2 :st3 :win :osx :linux

更新时间:2020-08-13 23:02:35

Browse

Pretty Shell

by aerobounce ST3

Prettify, Minify and Syntax Check bash / posix / mksh script with Sublime Text 3

Details

Installs

  • Total 2K
  • Win 481
  • Mac 819
  • Linux 330
Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29
Windows 0 4 2 4 2 4 3 3 3 1 3 2 1 1 4 3 1 3 2 2 6 4 2 1 3 0 4 1 3 1 6 3 0 1 0 3 2 3 4 1 1 1 4 1 2 0
Mac 4 4 10 5 3 2 5 2 6 2 4 2 5 5 5 4 7 4 4 1 3 5 7 6 7 1 1 5 4 8 4 3 3 4 3 4 2 1 4 2 3 3 4 4 4 4
Linux 3 2 1 3 1 2 0 2 1 3 2 2 1 0 5 2 0 2 0 0 1 2 2 2 2 1 2 2 2 1 1 1 1 3 0 1 0 1 4 1 1 1 5 3 0 2

Readme

Source
raw.​githubusercontent.​com

🐚 Pretty Shell

Shell Script Formatter / Syntax Checker for Sublime Text 3
For Every Shell Scripters.
Available via Package Control

🚅 Blazingly Fast Formatting / Minifying 🚦 Syntax Checking

📦 Install

  1. Package Control: Install Package
  2. Type PrettyShell and Install
  3. You're ready to script.
  4. Recommended to use SublimeLinter-shellcheck.
Manual Install “sh # 1. Clone this repository as shown below # 2. You’re ready (Restart Sublime Text if the package is not recognized) # Example on macOS (It should work on Linux / Windows too. # Follow the same steps with the equivalent clone target directory) cd ”$HOME/Library/Application Support/Sublime Text 3/Packages" git clone https://github.com/aerobounce/Sublime-Pretty-Shell.git “Pretty Shell” “

⚠️ Dependency

Pretty Shell does not work without shfmt as this package utilizes the formatter.
It is available via several package managers, and in pre-built binary form.

If Sublime Text does not recognize shfmt, specify the absolute path in the settings:

"shfmt_bin_path": "Absolute Path to shfmt"

📝 Available Commands

Caption Command Default Key Bindings
Pretty Shell: Format pretty_shell cmd or alt + ctrl + s
Pretty Shell: Format Selection pretty_shell_selection None
Pretty Shell: Minify pretty_shell_minify None
Pretty Shell: Minify Selection pretty_shell_minify_selection None
  • Command is the name of the command you can use for Key-Bindings.
  • Be aware that any manual modifications with Format Selection commands might be lost upon saving a file if format_on_save is true, which it is by default.

🛠 Default Settings

/* Pretty Shell */
"format_selection_only": false, // Entire file will be used if no selection available
"format_on_save": true,         // Invoke "Pretty Shell: Format" command on save
"shfmt_bin_path": "shfmt",

/* shfmt */
"simplify": true,   // Simplify the code
"minify": false,    // Minify the code to reduce its size (implies "simplify")
"language": "bash", // Language variant to parse (bash / posix / mksh)
"indent": 4,        // 0 for tabs
"binop": false,     // Binary operators such as '&&' and '|' may start a line
"switchcase": true, // Indent switch cases
"rediop": true,     // Redirect operators will be followed by a space
"align": false,     // Keep column alignment paddings
"fnbrace": false    // Place function opening braces on a separate line

🤝 Thank you