[Ann] BashSupport 0.9.7-maia

Hi all,
the latest update of the BashSupport plugin delivers many improvements and changes.

The most import changes are the new facet type to manage files without extensions and the newly added support for arithmetic expressions.

Your feedback and bug reports are highly appreciated.

The plugin page is http://plugins.jetbrains.com/plugin/?idea&id=4230 . The plugin is/should be available in IntelliJ's plugin manager.

Best regards,
Wallaby

Here's the changelog:

  • Source code released, licensed under the terms of the Apache License 2.0
  • New Bashsupport facet to configure which files without extensions are Bash scripts
  • Removed global settings, these are project settings now
  • Several parser fixes and improvements
  • Improved support for heredocs: Go to declaration and rename for markers
  • Arithmetic expressions are supported now, including variable declarations
  • New inspection and quickfix to replace a static arithmetic expression with the result
  • Arithmetic for loops
  • Color configuration for heredoc start and end markers
  • Improved color configuration dialog
  • Support for the "local" keyword
  • Fixed duplicate var name suggeestions in completion popup
  • Improved highlighting of unresolved variables
  • Highlighting of variables inside of strings
  • New inspection to unregister global variables
  • Support for simple variable substitutions, e.g. ${A}
  • Fixed || and && operators in conditional commands
  • You can turn on debug mode by setting the environment variable bashsupport.debug to "true", useful for debugging
10 comments
Comment actions Permalink

Hi,

How does the new facet work? When I select Facets in the Project Structure dialog and from there select the BashSupport facet, nothing appears in the large pane on the right under the label 'BashSupport' Facets.


Randall Schulz

0
Comment actions Permalink

Hi,
these are the general facet settings like auto-detection. Other modules (flex for example) have empty settings, too.

What happens if you add the Bashsupport facet to a module? Project settings->module, select your module and press the plus icon to add the facet.

That should work. At least it does for me

If it doesn't, please let me know which version of IntelliJ you are using.

Regards,
Wallaby

0
Comment actions Permalink

OK, I see. I've never manually added a facet before. I have this vague recollection of facet auto-detection being the only way to get facets attached to your project at some point early on in the facet concept.

There does seem to be some odd behavior w.r.t. the icons in the Custom Settings display. Those that start out with the purple [?] icon change to a white, generic document icon when you click them. And when I changed the first one to "Accept" all the remaining [?] icons (those further down in the list) changed to the generic document icons.

Another related anomalous behavior of these icons is exhibted when there are enough to scroll off the display. The icons are all initially the purple [?] icons but when you scroll them off and back onto the screen, some are changed to generic document icons (possibly those that were actually scripts). Scrolling them again leaves them all generic document icons.

I don't know if the API you have to work with there allows multiple selection, but if it does, it would be nice to enable it. I have a _lot_ of shells scripts mixed in with data files...


By the way, it seems that using a file's execute permissions might make a good heuristic to make available or incororate into whatever auto-detection you're currently doing.


Randall Schulz

0
Comment actions Permalink
I don't know if the API you have to work with there allows multiple selection, but if it does, it would be nice to enable it. I have a _lot_ of shells scripts mixed in with data files...


+1

also It would be great to have button 'expand all' as it doesn't show all files but only without extension and it's not too many of them

0
Comment actions Permalink
Arithmetic expressions are supported now, including variable declarations

cool!
much better now


here are some bugs


error is "Expected a command with optional pipeline"

export DIR=${DIR:-$(abspath $(dirname $0)/../..)}



error is "Unexpected token"

a=3
b=`expr $a \> 10`



error is "Expected a command with optional pipeline"

message=Hello
Hello=Goodbye
# should echo Goodbye
echo "${!message}"



still no support for parameters in shebang

#!/bin/bash -x
0
Comment actions Permalink

Hi WiWi,
thank you for reporting this.

The bugs will be fixed with the next update (shouldn't take as long as the last one).

I'll see what I can do for the facet configuration user interface.

Best regards,
Wallaby

0
Comment actions Permalink

Hello All,

Does anyone know how to suppress automatic reformatting of bash scripts by IDEA?
I have "Reformat code" selected by default in the Commit dialog, and this has screwed up my scripts quite a few times on checking in.

--
Sergei

0
Comment actions Permalink

Hi,
I have not seen such an option.

The formatter is still experimental, I could add an option to disable it completely.

Regards,
Wallaby

0
Comment actions Permalink

Yes, please, if you can. My major problem is that it inserts spaces where they are not desired and removes spaces where I want to retain them. And there's no way to configure it at the moment. I'd rather have a "turn off reformatting" option than keep reverting my check-ins every so often.

Thanks,

Sergei

0
Comment actions Permalink

Try again with 0.9.9-maia, this should turn the formatter off by default.

Regards,
Wallaby

0

Please sign in to leave a comment.