DEV Community

loading...

IntelliJ features: ExplainShell

Bruno Oliveira
・2 min read

Introduction

The longer a developer works with a certain IDE, the more comfortable and familiar it will feel, and productivity will rise very quickly in the first few weeks of working with it, and, if you're like me, it will approach a flat curve where, it basically stops rising to become more of a constant.
You end up falling back on the same old, simpler commands, and yet, for very specific actions, you find yourself more often than not, taking the long route, having to look up shortcuts or googling around StackOverflow.

However, you should know that current, modern IDEs are extremely powerful and versatile, and, if you are using it for your company job, chances are you have access to an Ultimate version, so, we can improve our workflow by leveraging some tricks besides the simpler ones.

Handy feature: Shell support

I'm a Java developer, so, I use IntelliJ to write Java, 99% of the time. However, there can be times where some tweaking with Python is necessary, or writing shell scripts to provide support for Integration Tests, for example.
Precisely, while working with shell scripts, I discovered a handy feature, that can actually accelerate my learning of the tools I'm working it, all while staying inside IntelliJ: it's called ExplainShell.

Let's say, I have a simple bash script where I reference a variable but it's not assigned. IntelliJ will detect it and show me this:

Alt Text

So it knows that we did something wrong there, and, honestly, unlike Java, there's not a lot for helping us out here... or is it?

It turns out, there is! When we click "More Actions", we get a new prompt, showing us this:

Alt Text

And what we are interested, is the "Explain Shell" selected above. When we click it, we get yet another dialog:

Alt Text

And, if we choose to see the explanation for the command, IntelliJ redirects us to a website called "ExplainShell":

Alt Text

where we have the selected command with a handy explanation of how it works! Pretty awesome right? :D

Available on IntelliJ Ultimate Edition 2020.

What are some cool "hidden gems" of your IDE?

Discussion (1)

Collapse
bolt04 profile image
David Pereira

wow this is a cool feature I didn't know about. Thanks Bruno 👍