Wicked Shell is your friend: Using the shell from Eclipse

I am using the Git flow as my development model. It is very easy to understand and use. Keeps development nice, tidy and clear. See more information for links about Git flow.

When preparing a release the release or version number needs to be bumped (increased). This requires a shell script. I was switching to a command prompt to do this. Then I came across a nifty little plug-in for Eclipse, so I can execute the shell script from within Eclipse. It is called Wicked Shell.

I will take you through the installation steps and basic usage:

Installation

To install Wicked Shell follow these steps:

  • Open the Eclipse Marketplace (Help > Eclipse Marketplace…)
  • Search for “Wicked Shell”
  • Click on the Install button
  • Restart Eclipse when the installation has completed

You are ready to go

Configuration

There is not much to configure, but I like to change the startup directory from the workspace to my git root.

  • Open the Preferences (Window > Preferences)
  • Search for “Wicked Shell”
  • Uncheck the check box “Use workspace as startup directory”
  • Enter the startup directory or click the Browse… button to select it
  • Click on the OK button

Usage

Wicked Shell comes with two views: Shell and Batch Files.

The Shell view provides a wrapper to the system shell. To use the shell you need to open it.

  • Open the Show View (Window > Show View > Other…)
  • Search for “Shell”
  • Select “Shell”
  • Click on the OK button

Now a tab Shell is available and you can type as if working in a system shell.

The Batch Files view provides an easy way to execute shell scripts:

  • Open the Show View (Window > Show View > Other…)
  • Search for “Batch Files”
  • Select “Batch Files”
  • Click on the OK button

To select a script:

  • Right click on the left pane of the Batch Files window
  • Select the option Select exiting Batch File
  • The Batch File is displayed in the left pane of the Batch Files window
  • To execute a shell script:
  • Right click on the shell script
  • If the shell script requires a parameter(s), select Set Parameters for Batch File
  • Enter the parameters as you would normally do on the command line
  • Click the OK button
  • Right click on the shell script again
  • Select Run Batch File in Shell

Pretty cool right? No more switch to the shell, conveniently work from within Eclipse.

Tips

If the shell stops responding you can restart it by opening the View Menu > Restart Shell. The View Menu is the icon with a triangle pointing down on the left side of the shell.

More information

Leave a comment