shellintegration

package
v0.94.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package shellintegration marks a shell session's prompt for the terminal with OSC 133, the way Ghostty's shell integration does, so the native window's terminal (libghostty-vt) clears the prompt on a resize instead of leaving the lines a reflow wrapped above the one the shell draws again.

The scripts are written to disk once at startup (Install) and the shell is pointed at them when its session spawns (Apply): zsh through ZDOTDIR, bash through --rcfile, fish through XDG_DATA_DIRS. Each one gives back what it borrowed and reads the user's own rc files as the shell would have.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(shell string, args, env []string, dir string) ([]string, []string)

Apply returns the arguments and environment that start shell with the integration in dir. A shell it has no script for (sh, PowerShell) is returned as it came.

func Dir

func Dir(configDir string) string

Dir is where Install writes the scripts under lich's config directory, which a confined session's sandbox mounts read-only.

func Install

func Install(dir string) error

Install writes the scripts into dir, replacing what an older lich wrote.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL