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

Pretty Shell

by aerobounce ST3

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

Details

Installs

  • Total 5K
  • Win 2K
  • Mac 2K
  • Linux 950
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 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18
Windows 0 4 4 5 6 8 7 6 5 1 7 6 6 4 6 2 1 6 13 7 8 6 3 5 5 9 3 8 6 3 1 14 1 8 7 5 3 3 6 6 9 11 7 4 4 8
Mac 0 4 7 6 11 9 3 2 2 4 3 9 10 6 11 2 2 4 4 5 10 4 1 1 8 11 11 11 7 2 3 11 3 12 8 4 1 3 11 9 15 6 9 3 8 11
Linux 0 0 1 2 2 4 3 1 0 1 1 6 3 2 0 2 1 2 2 2 5 1 1 2 1 2 0 1 3 0 1 2 0 1 1 4 1 0 3 5 4 0 0 1 2 3

Readme

Source
raw.​githubusercontent.​com

🐚 Pretty Shell

Shell Script Formatter / Syntax Checker for Sublime Text 3

⚡️Blazingly Fast Formatting / Minifying
❗️User Friendly Syntax Error Indication
🚦Syntax Checking


Highlights

  • ✨ Format on save
  • Format selection
  • Syntax errors are shown in popup with messages
    • ✨ Popup will be presented at the point error occured
  • ✨ Auto-scroll to the point where the syntax error occured

Install

Available via Package Control

  1. Package Control: Install Package
  2. Type Pretty Shell and Install

Manual Install

  1. Clone this repository to .../Sublime Text 3/Packages/ (Note that target directory name must be Pretty Shell)
  2. Ready (Restart Sublime Text if the package is not recognized)

Requirements

shfmt

Available via variety of ways. Visit mvdan/sh for the latest information.

  • macOS Users:
    • If your shell does not have PATH to shfmt, you need to specify shfmt_bin_path.
  • Linux and Windows Users:
    • You need to specify shfmt_bin_path.
"shfmt_bin_path": "Absolute Path to shfmt"

Commands

Command is the name of the command you can use for Key-Bindings.

Caption Command Default Key Bindings
Pretty Shell: Format pretty_shell (CMD / 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

Settings

/* Pretty Shell */
"shfmt_bin_path": "shfmt",
"format_on_save": true,
"format_selection_only": false,
"scroll_to_error_point": true,

/* shfmt (Leave these untouched to use shfmt's default behavior) */
"simplify": false,   // Simplify the code
"minify": false,     // Minify the code (implies "simplify")
"language": "",      // bash / posix / mksh (default: bash)
"indent": "",        // 0 for tabs
"binop": false,      // Operators such as '&&' and '|' may start a line
"switchcase": false, // Indent switch cases
"rediop": false,     // Redirect operators will be followed by a space
"align": false,      // Keep column alignment paddings
"fnbrace": false     // Place function opening braces on a separate line

Acknowledgements