[Ann] BashSupport 0.6

Hi,
there's another update of the BashSupport plugin now.
Parsing is still not perfect, this will take a while.

But at least the issue with nested strings is fixed now and there are no major problems with
the support for the most common script elements. The rename refactoring is not yet perfect but should work in most cases.

If you'd like to help please provide some feedback.
If you have a valid script which isn't parsed I'd be glad to get the problematic snippet.

The changes:
-Improved parsing (multiline strings, strings with embedded subshell command, ${} parsing)
-Support for the "declare" command
-Rename refactoring for functions
-Rename refactoring for variables

You can expect a slower pace of development in the future :)

Regards,
Wallaby

5 comments
Comment actions Permalink

Hi.

I have found the following parsing issues
ij_bash_parse.png
Thanks.

0
Comment actions Permalink

That is an odd script.

The value assigned to homedir extends to the end of line 6 (the line containing what appears to be a cd command—the second such appearance, in fact—but is not really because it's part of a single-quoted string that begins on the "export homedir" line). All the errors signalled are indeed spurious, though.

Perhaps the image capture is somehow hiding two ending single quotes, one on line three and another on line six?


Randall Schulz

0
Comment actions Permalink

Hi,
thank you for your feedback.

I just fixed the problem with the "\ " escape for the next update.

But you don't have a closing ' in line 6, don't you?

Wallaby

0
Comment actions Permalink

Hi Wallaby,

I have an example script (attached) that still has a few parse errors that you might like to take a look at. Also, here's another snippet that fails to parse:

#!/bin/sh
curDate=$
deployRoot=$
dataRoot=$

Thanks for your plugin, your efforts are much appreciated. I've found it to be very useful already and it's great to see it being improved so quickly.

Chris


Hi,
there's another update of the BashSupport plugin now.
Parsing is still not perfect, this will take a while.
But at least the issue with nested strings is fixed now and there are
no major problems with

the support for the most common script elements. The rename
refactoring is not yet perfect but should work in most cases.

If you'd like to help please provide some feedback. If you have a
valid script which isn't parsed I'd be glad to get the problematic
snippet.

The changes:
-Improved parsing (multiline strings, strings with embedded subshell
command, ${} parsing)
-Support for the "declare" command
-Rename refactoring for functions
-Rename refactoring for variables
You can expect a slower pace of development in the future :)

Regards,
Wallaby

0
Comment actions Permalink

Hi Wallaby,

Thanks for excellent work!
As a relatively inexperienced bash user, having Ctrl-Q would be a nice
addition.

Cheers,
-tt

0

Please sign in to leave a comment.