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 4K
  • Win 1K
  • Mac 2K
  • Linux 772
Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4
Windows 0 3 2 1 3 4 5 1 5 4 7 3 7 2 1 1 3 6 8 6 5 1 2 10 6 3 5 6 3 4 3 3 1 4 5 1 4 2 3 2 3 3 1 4 7 9
Mac 1 2 6 6 7 1 9 2 2 10 5 7 5 3 1 4 4 5 3 10 7 2 0 7 7 8 4 2 6 5 5 5 6 9 5 2 2 7 5 9 7 1 1 4 4 2
Linux 1 1 1 2 3 1 2 3 2 5 3 3 1 2 2 2 4 1 4 3 3 1 1 1 3 2 3 1 0 3 3 3 2 3 1 4 1 1 2 1 1 2 1 0 1 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