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

  • 1.4.0
  • github.​com
  • github.​com
  • 12 months ago
  • 38 minutes ago
  • 2 years ago

Installs

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

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