[Ann] BashSupport 0.3

Version 0.3 of the BashSupport plugin has been released today. The changelog is available at http://plugins.intellij.net/plugin/?id=4230 .

This is still beta quality. 95% of the Bash 3.2 syntax should be supported, though. If you find valid code which isn't parsed by the plugin please let me know.

I'd appreciate feature suggestions and general feedback.

4 comments
Comment actions Permalink

Hello, W.P,

Thanks for giving us BASH support. I'm write many BASH scripts in my work-a-day life.

I just installed version 0.3 and opened one of my scripts and found a few things that it's marking as invalid (red text below is that which was marked with a red undersquiggle in IDEA):

1) Array variable initalizations:

    args=()

...
   clifList=(
        "BTSU.clif"
   )

...
   clifList=( "${clifList[@]}" "$arg" )



2) Case syntax:

    --script=*)
        if [ ! "$explicitScript" ]; then
            scriptList=( "$arg" )
            explicitScript=1
        else
            scriptList=( "${scriptList[@]}" "$arg" )
        fi
        ;;

        esac

3) Parenthesized commands:

(
  (


    # Run the test(s)
    ttt \
        "${clifList[@]}" \
        "${scriptList[@]}" \
        "${taskList[@]}" \
        --id="BTSU" \
        "${tpOptions[@]}" \
        "${args[@]}"


  ) \

  >|"$tName-out" \
) \
2>&1 |fixCP >|"$tName-dbg"



Randall Schulz

0
Comment actions Permalink

Randall,
thank you for your feedback.
I just released a bugfix update, i.e. version 0.4 which also includes new features.

It parses now the samples you posted. I forgot to handle Bash's arrays and the >| redirect
If there's anything else which doesn't work please let me know.

Wallaby

0
Comment actions Permalink

Thanks. BashSupport 0.4 solves most of the problems. And I discovered one new case in code I just added.

Array setting that is split across lines is still being incorrectly flagged as erroneous:

    scriptList=(
        --script="BTSU"
    )


In two out of three cases just like this one, the final close paren is included in the flagged (red undersquiggle) area. In one of them it is not. In a similar initialization with an empty initializer, no error was indicated:

    tpOptions=(
    )



Array declarations are also flagged as errors:

    declare -a  clifList=()
    declare -a  scrsiptList=()
    declare -a  taskList=()
    declare -a  tpOptions=()



Randall Schulz

0
Comment actions Permalink

Hello Randall,

Array setting that is split across lines is still being incorrectly
flagged as erroneous:

>

scriptList=(
--script="BTSU"
)


Fixed. Will be in the next update.

Array declarations are also flagged as errors:

>

declare -a clifList=()


The declare command is not yet support. It's on my todo list, though.

Thank you for your feedback!

With all the possibilities of the syntax it's still a long way for 100% Bash support. Sigh.
Wallaby

0

Please sign in to leave a comment.