# Autocomplete & Shell integration

## Autocomplete

Autocomplete in Termius uses data from many sources to suggest snippets, shell history commands, paths, and built-in commands with arguments. It can also detect password prompts and suggest matching Identities. You do not need to install third-party packages or dependencies to use autocomplete.

### Enable autocomplete

Enable `Autocomplete` in one of these ways:

1. Open `Settings → Terminal`, then turn on `Autocomplete`.<br>

   <figure><img src="/files/QRgDVAMwuWzu4fXnDStN" alt=""><figcaption></figcaption></figure>
2. Open the terminal side panel, click the `rocket` icon, then turn on `Autocomplete`.<br>

   <figure><img src="/files/Js3n0vBYGopyGYwlG2ht" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Autocomplete is not available in **PowerShell** or **CMD**.
{% endhint %}

## Shell integration

Shell integration works in the local terminal and in supported SSH sessions. It helps Termius detect the current directory, command history, prompts, and active command state.

Termius uses that data for Autocomplete and other terminal features. In remote sessions, Termius opens additional `exec` channels next to the main `shell` channel. It uses those channels to fetch data such as paths and command history.

## Command suggestions

<figure><img src="/files/ZBVsu7hPwC7NZO7TwmV6" alt=""><figcaption></figcaption></figure>

Termius Autocomplete provides suggestions from multiple sources, including command history, file and directory paths, built-in commands and arguments, and argument descriptions when available.

## Snippet suggestions

<figure><img src="/files/P9ZZDdT9jYA1EAvMaVO5" alt=""><figcaption></figcaption></figure>

Autocomplete in Termius makes snippets more accessible. They are integrated into autocomplete suggestions, and you can quickly find and execute one without searching for it in the side terminal panel. Start typing the Snippet name or any text from its script, and Termius shows matching Snippets in the suggestion list.

## Password suggestions

<figure><img src="/files/GQ2kp5FOotDeB0lDimto" alt=""><figcaption></figcaption></figure>

When Termius detects a password prompt, it suggests [identities](/keychain/identities.md) (saved combinations of username/password/key) to choose from. Learn more about Identities in Termius -> [Identities](/keychain/identities.md).

## Known limitations & system requirements

#### Local terminal

Shell integration for the local terminal works only with `bash` and `zsh`.

#### Remote connections

* SSH server: OpenSSH 7.2+
* Shell: `bash`

In supported SSH sessions, Termius opens additional `exec` channels to fetch paths and command history.

{% hint style="warning" %}
Some servers reject `exec` channels and may drop the connection.

This often happens on network equipment or locked-down systems.
{% endhint %}

If the connection drops, turn off `Autocomplete`.

If you manage the server, allow at least two sessions per connection:

1. Open the `sshd_config` file on your server
2. Find `MaxSessions`, then set it to `2` or higher
3. Save the file
4. Restart the SSH server. Use `sudo systemctl restart ssh` or `sudo service ssh restart`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.termius.com/terminal/autocomplete-and-shell-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
