Please enable JavaScript to view this site.

Navigation: » No topics above this level «

Using Starship with TCC

Scroll Prev Top Next More



TCC can use Starship as its prompt renderer without Clink, Lua, starship init cmd, or a startup script. TCC invokes starship.exe directly and keeps its normal PROMPT value as a safe fallback.

 

Prerequisites

 

Install starship.exe and either:

 

•make it available through PATH; or

•configure its absolute path with Starship Executable in Settings or STARSHIP /SETEXE=<absolute-path>.

 

Do not put starship init cmd in TCSTART, TCEXIT, or a TCC alias. That integration is for CMD plus Clink, not TCC.

 

Enabling the prompt

 

Open Settings > Command Input and configure:

 

Setting

Default

Description

Starship Prompt

No

No uses TCC PROMPT; Auto uses Starship when it can be found; Yes enables the configured compatible provider.

Starship Executable

empty

Optional absolute path to starship.exe. Leave empty to search PATH.

Starship Prompt Timeout

250 ms

Render deadline. TCC clamps values to 50-2000 ms.

Starship Prompt Maximum Bytes

65536

Largest UTF-8 response accepted from one render. TCC clamps values to 4096-262144 bytes.

 

The same settings can be controlled from TCC:

 

STARSHIP /STATUS
STARSHIP /ENABLE
STARSHIP /DISABLE
STARSHIP /AUTO
STARSHIP /SETEXE=C:\Tools\starship.exe
STARSHIP /TEST

 

/ENABLE verifies that the configured executable accepts TCC's prompt arguments before saving the setting. /AUTO does not require Starship to be installed; it quietly falls back to PROMPT when the executable is missing. /SETEXE= accepts an absolute drive or UNC path. Use an empty value to return to PATH lookup:

 

STARSHIP /SETEXE=

 

/TEST renders one prompt without changing PROMPT and always bypasses the short missing-executable cache.

 

Prompt context

 

For each interactive prompt, TCC supplies Starship with:

 

•the last command's exit status;

•the completed command duration;

•the current terminal width; and

•TCC's normal process environment and current directory.

 

Starship retains ownership of starship.toml, custom modules, themes, and all other Starship configuration. TCC does not read, rewrite, or evaluate that configuration.

 

Safety and fallback behavior

 

Starship output is treated as untrusted display data. TCC:

 

•launches starship.exe directly, not through Cmd, TCC, or PowerShell;

•provides NUL standard input, so rendering cannot consume terminal input;

•applies a timeout and output limit;

•terminates timed-out renderer process trees;

•accepts UTF-8 text, tabs/newlines, and ANSI SGR styling only;

•rejects OSC, hyperlinks, clipboard access, titles, terminal modes, and other terminal-control sequences; and

•appends an ANSI reset after styled output so formatting cannot leak into the command line.

 

On a timeout, incompatible executable, invalid output, or other render error, TCC discards all Starship output and displays the normal PROMPT instead. It reports the first failure in a TCC process session. STARSHIP /STATUS shows the resolved executable, compatibility result, active limits, and the latest render result and duration.

 

TCC preserves its existing OSC 133 shell-integration prompt markers, so Take Command command boundaries continue to work.

 

Scope

 

This is a global TCC prompt setting. It applies to local TCC sessions, including TCC in Take Command tabs. It does not configure a remote shell in SSH tabs or a serial device, and it does not change Take Command terminal rendering or connection profiles.