Skip to end of banner
Go to start of banner

Windows terminal compatibility for the ACLI Shell

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

\uD83E\uDD14 Problem

Terminal apps adopt the Windows native Console Host (conhost.exe) executable for implementation.
Under Windows 10, the conhost.exe exhibits a bug that limits ACLI Shell functionality.
In this environment, conhost.exe incorrectly interprets a critical VT100 control sequence as a VT52 sequence, which breaks the ACLI Shell interactive renderer. As a result, terminal apps that rely on conhost.exe executable under Windows 10 fail to function as designed.

The issue is rectified in the conhost.exe shipped with Windows 11 as well as when running apps in Windows Terminal and other VT100-compliant terminal emulators (e.g. ConEmu, CMDER, Alacritty, and WezTerm) in Windows 10.

\uD83C\uDF31 Solution

The Windows terminal compatibility table shows how to handle environment variables on Windows 10 and Windows 11 for ACLI 10.6 and earlier and ACLI 11.0

Windows terminal compatibility

Windows Version

ACLI Version

Description

Windows 10

In ACLI 10.6, set the WT_SESSION variable

Setting WT_session variable enables non-Windows terminal emulators on Windows 10 for ACLI v10.6 and earlier.

Windows 10

ACLI v11

The WT_SESSION variable is not required, when using one of these terminals:

  • Windows Terminal

  • WezTerm

  • Alacritty

  • ConEmu

  • CMDER

Windows 11

ACLI v11

No constraints on the choice of terminal, including the legacy Windows console (conhost.exe).

ACLI v10.6 and earlier
How to fix the conhost.exe interpreting of VT100 control sequence

To remedy the issue with Windows 10, apply the workaround as shown:

  1. Open the environment variables settings on your system.

  2. Create a new environment variable named WT_SESSION and set its value to any non-empty string (e.g., 1).

  3. Save the changes, and restart your terminal application.

  4. Launch the ACLI shell.

Remember that the shell proper functioning depends on the correct implementation of the VT100 specification of the terminal emulator.
Setting the WT_SESSION environment variable alone may not be sufficient for the shell to function correctly.

If the terminal emulator still uses the broken conhost exe, users may notice that the terminal renders garbage on the screen as soon as the app provides completions.

To ensure the best experience with the ACLI shell, it is recommended to use a fully VT100-compliant terminal emulator or upgrade to Windows 11 or Windows Terminal.

ACLI 11.0.0
How to fix the conhost.exe interpreting of VT100 control sequence

The issue is resolved using the additional terminals that ACLI v11 supports, removing the need for additional configuration (i.e. WT_SESSION).

The supported terminal emulators on Windows 10 are:

  • Windows Terminal

  • WezTerm

  • Alacritty

  • ConEmu

  • CMDER

If you know of another VT100-compliant terminal on Windows 10, you can test it using the instructions given for ACLI 10.6.0 and earlier.

If the shell works, contact us so that we can add official support for that terminal.

Additional environment variables

Depending on your requirements and specific cases, additional environment variables for Shell configuration are available and described in the Environment Variables Table.

Environment variable

Description

ACLI_SHELL_GLYPHS

Value is one of ascii, unicode, powerline, or nerdfont.

The shell automatically sets the glyph set to ascii when either the ConEmu or Cmder terminals are detected on Windows in ACLI v11

ACLI_SHELL_THEME

Value is one of the themes available in the shell (or a custom theme).

NOTE

  • Some terminals may have complex color schemes, you can create your own color scheme.

  • To display the available themes type /settings theme set .

ACLI_SHELL_CACHE_DIR

It allows you to specify where to store the shell cache files.

ACLI_SHELL_CONFIG_DIR

It allows you to specify where to store the shell config files.

ACLI_DEFAULT_TABLE_STYLE

This variable is useful, if you do not have full unicode support in the terminal:

  • set the value to TEXT to get acli to use ascii chars rather than unicode when rendering tables. It also forces the shell to act as if ACLI_SHELL_GLYPHS was set with the value ascii.

ACLI_SHELL_DEBUG

Set the value to 1 to generate debug output.

Set the value to 2 to add trace information.

ACLI_SHELL_LOG

It sends the debug to a log rather than a terminal. This environment variable is recommended if you use the debug variable ACLI_SHELL_DEBUG .

The value for this variable is the path to the log file where the debug and trace information is to be sent: an empty string value uses the default path acli-shell.log

  • No labels