IntelliJ IDEA News

The New Terminal (Beta) Is Now in JetBrains IDEs

Read this post in other languages:

TL;DR: The new terminal (Beta) is now in JetBrains IDEs and will be available in the new UI starting from the 2024.1 version of the IDEs. You can switch between the old and new terminal in Settings/Preferences | Tools | Terminal | Enable New Terminal. Currently, it supports only Bash, Zsh, and PowerShell, with other shells in development. This blog post covers the architectural and visual changes and outlines our plans.

Software developers use terminals for a variety of tasks. Though it’s a basic element of programming, the convenience of a terminal lies in its ability to provide a universal way of managing tasks without needing to be proficient in all UI elements. Modern solutions, on the other hand, come with numerous productivity enhancements, such as smart layouts for the command prompt and output, command completion with a list of options, AI-powered functions, and many others.

Aiming to combine both basic and advanced capabilities, the new terminal  is a familiar tool presented in a fresh way and with an expanded set of features. Our goals are to preserve the functionality of working in a terminal, enhance convenience and simplicity, and address long-standing issues. This article will guide you through the changes to the terminal in JetBrains IDEs and our plans for the future.

Visual changes

The new terminal aligns with the look and feel of the new UI and is available in all JetBrains IDEs starting from version 2024.1. The primary visual distinction of the new terminal is that each command is now presented in a separate block. This helps you quickly locate the start and end of each command, enhancing the readability of the output. This change brings other new capabilities, such as easy navigation between blocks using arrows and switching between the prompt and output using the ⌘↑ / ⌘↓(macOS) and Ctrl+↑ / Ctrl+↓ (Windows and Linux) shortcuts.

Another significant change is the command completion feature that supports commands, paths, arguments, and options, aimed at simplifying command entry. 

A new, convenient command history has been added, which allows for filtering and makes it easier to navigate through recently executed commands. The UX designers have also revamped the color scheme – the palette is now aesthetically pleasing and easy to read.

Architectural changes

The new terminal is not just visual changes, but a new architecture that made these changes possible. Here are the most notable changes:

We took full control over the prompt area of the terminal. You can now use editor actions and move the cursor with the mouse during command input. At this stage, some shell shortcuts either do not work or behave incorrectly. We are working to address these issues.

We reworked command completion that integrates all of the IDE’s knowledge into the suggestions. Since we are still working on this update, some completion options may not be available or they may differ from shell-based completion.

We added our own command prompt, which shows the current directory, Git branch, Python virtual environment, and Anaconda environment. This is intended to provide a rich, modern command prompt even if it is not configured in a shell. We understand that some prefer having the same prompt as in the system terminal, and we are working on an option to allow this.

How to enable the new terminal

Starting from version 2024.1, when the Terminal tool window is opened for the first time, you will see a promotional window for the new terminal. After that, you can switch between the old and new terminal using the three dots menu in the upper right corner of your Terminal tool window or via Settings/Preferences | Tools | Terminal | Enable New Terminal.

At the moment, we only support a limited set of shells: Zsh, Bash, and PowerShell. If you use any other shell, you will see the old terminal even if the new setting is enabled.

What’s next?

Currently, we’ve only taken the first step in overhauling the terminal, and there’s much more work ahead. Our immediate focus is on improving the stability of the new terminal and refining its current behavior.

We plan to introduce more terminal customization options (fonts, spacing, etc.), improve command completion, add the ability to switch between the built-in and shell prompt, introduce context actions for blocks, and streamline tab management in the terminal. Additionally, we have plans to implement useful AI capabilities, such as assisting in command typing or explaining the obtained results.

How to provide feedback

The new JetBrains IDE terminal, which will be made available from v2024.1, is in Beta and currently undergoing changes and improvements. At this stage, your feedback is crucial to us. Our goal is that the new terminal will have the same capabilities as the old one, while offering a host of beneficial new features. 

As we are currently in the development process, we acknowledge that some issues may arise when interacting with the new terminal. Please report any issues on YouTrack. Below you can find several links to familiarize yourself with known issues:

We plan to add a survey in the IDE where you can share your impressions of the new terminal. We would also be grateful for any feedback in the comments section below. Thank you!

image description