Giter Site home page Giter Site logo

aerobounce / sublime-pretty-shell Goto Github PK

View Code? Open in Web Editor NEW
36.0 2.0 3.0 476 KB

๐Ÿš Shell Script Formatter / Syntax Checker (Powered by shfmt)

License: GNU Affero General Public License v3.0

Python 100.00%
sublime-text-3 sublime-text sublime-text-plugin sublime-package sublime-plugin shfmt shell shell-script beautify formatter

sublime-pretty-shell's Introduction

๐Ÿš Pretty Shell

Shell Script Formatter / Syntax Checker for Sublime Text

  • Uses shfmt
  • Format on Save
  • Fast Formatting
  • Syntax Checking
  • Inline Syntax Error Popup
  • Auto Scroll to the point parsing error occurred

Install

Available via Package Control

  1. Install shfmt
  2. Package Control: Install Package
  3. Install Pretty Shell
  4. Linux / Windows users: Specify absolute path to shfmt in Settings.

sublime-pretty-shell's People

Contributors

aerobounce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sublime-pretty-shell's Issues

Make default settings generic

As I wrote this package for myself, default settings contains my personal preferences.
#5 gave a good opportunity to re-think about this.

Exception received: ValueError: invalid literal for int() with base 10: ''

I use the default settings with a fresh plugin installed and got the following error:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 1088, in run_
    return self.run(edit)
  File "/home/georf/.config/sublime-text-3/Installed Packages/Pretty Shell.sublime-package/PrettyShell.py", line 190, in run
  File "/home/georf/.config/sublime-text-3/Installed Packages/Pretty Shell.sublime-package/PrettyShell.py", line 185, in shfmt
  File "/home/georf/.config/sublime-text-3/Installed Packages/Pretty Shell.sublime-package/PrettyShell.py", line 162, in format_text
  File "/home/georf/.config/sublime-text-3/Installed Packages/Pretty Shell.sublime-package/PrettyShell.py", line 70, in update_phantoms
ValueError: invalid literal for int() with base 10: ''

Add a kill switch to fallback to shfmt default settings

Related to #7, as originally pointed out in #5, there should be a switch to on/off preferences defined in sublime settings so users easily can fallback to shfmt's vanilla behavior without commenting out one's own settings, and vice versa.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.