> For the complete documentation index, see [llms.txt](https://docs.termius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.termius.com/terminal/autocomplete-and-shell-integration.md).

# Autocomplete & Shell integration

This page explains how Autocomplete and Shell integration work in Termius, how to enable Autocomplete, and what limitations apply.

## 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`

   <figure><img src="https://1830966906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5PCLq8V6ZExygzYl6XVJ%2Fuploads%2FZiEKVimZsRctqgNlJ9qj%2FAutocomplete.png?alt=media&amp;token=7366a61a-4705-4b9a-9837-ded92843d6fd" alt=""><figcaption></figcaption></figure>
2. Open the terminal side panel, click the `rocket` icon, then turn on `Autocomplete`

   <figure><img src="https://1830966906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5PCLq8V6ZExygzYl6XVJ%2Fuploads%2FUyquHHIMiuUS3wZzsMmE%2Fai.png?alt=media&amp;token=43e2ff54-182c-46ce-bc27-0f40775efff9" 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="https://1830966906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5PCLq8V6ZExygzYl6XVJ%2Fuploads%2FiTxQ6rDwsnR6CYncFtzc%2Fcommand%20sug.png?alt=media&amp;token=1130588d-3d41-480a-8a33-43253399d240" 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="https://1830966906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5PCLq8V6ZExygzYl6XVJ%2Fuploads%2F7PRtHrvrHZ8JRR6PZiwg%2FAutocomplete%20with%20snippets%20(1).png?alt=media&amp;token=4abde81a-fcbc-49e9-bb41-f801d32e8166" 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="https://1830966906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5PCLq8V6ZExygzYl6XVJ%2Fuploads%2FjsbCynqyTORPvRi8YOay%2Fpassword%20suggestions.png?alt=media&amp;token=53c228c1-7ba2-41fd-9fa9-67d99c782a48" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
