Completion for if [ -

When I first used the free version of BashSupport I was able to get help for the if [ -? and it showed all the possible switches and explanations like check for exist or check for set.
With BashSupport Pro (eval version 30 days) installed in Clion this feature seems to be gone or is not working. When typing “if [ -” no help shows up also not if I enter crtl space.

Is this supposed to work? If why was it removed?


@msandres13 Thanks for your feedback!
BashSupport Pro isn’t sharing code with the legacy plugin, so it’s probably an oversight but not intentional.

Could you post a screenshot of the help you’re looking for?
I checked with legacy BashSupport and didn’t see completions for if [ -, but I’m most likely missing something here.

Update: JetBrains’ Shell plugin has completions in this context. Perhaps you had enabled that plugin? I didn’t keep that feature because in my opinion it’s unclear what’s inserted (labels instead of showing operators) and a complete implementation should allow finer-grained completions and also quick-doc on operators. I’ll most likely ship improvements here with the next major version 2.0.


I just made a Video of it, and yes you are right this completion works even without the BashSupport plugin.
The bad thing is that BashsupportPro “destroys” this functionality while BashSupport does not. Thats the reason why I consider this a bug, not a feature.

if the completions looked like the screenshot above, then the JetBrains Shell plugin was overriding the legacy BashSupport file and editor support, i.e. legacy BashSupport wasn’t even active.
BashSupport Pro prevents to be overridden by Shell and thus isn’t showing these completions. It’s not possible to merge the completions here.

If it’s looking differently, then I’d be glad for a screenshot or the video.

I’ve now implemented improved support for completion of conditional commands for 2.0. The first preview will be out soon, but the parameter completions won’t be backported to 1.x.


I made a video to show where it works and how.
Bottom line is with

  • jetbrains bash plugin, “if” completion works
  • BashSupport plugin, “if” completion works (probably because jetbrains is not disabled)
  • BashSupportPro plugin, “if” completion does not work
    Link to video

Thanks, @msandres13!
I now understand what happened. You had BashSupport installed – that’s an empty plugin with just the notification to let users know why it retired. That means that JetBrains Shell is handling shell scripts.

In the first example, the completion of [ -r ] became [ --r $file ] (note the double -).
--r is invalid syntax and breaking the script and one of the reasons why I had not included that feature in BashSupport Pro.

The improved version is going to handle the issue above and will show quick documentation when you invoke it on an operator like -r, among other improvements.


1 Like

I released 2.0.0-beta1, which comes with improved support for test expressions.
Complete changelog at