{"modulePath":"github.com/lichdotdev/lich","version":"v0.93.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package shellintegration\n\nPackage 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.\n\nThe 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.\n\n## Functions\n\n```go\nfunc Apply(shell string, args, env []string, dir string) ([]string, []string)\n```\nApply 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.\n\n```go\nfunc Dir(configDir string) string\n```\nDir is where Install writes the scripts under lich's config directory, which a confined session's sandbox mounts read-only.\n\n```go\nfunc Install(dir string) error\n```\nInstall writes the scripts into dir, replacing what an older lich wrote.\n\n","path":"github.com/lichdotdev/lich/internal/shellintegration","name":"shellintegration","synopsis":"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.","isRedistributable":true}
