mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-13 05:16:15 +00:00
feat: add GHOSTTY_BIN_DIR to path via shell integration (#8976)
Closes #8956 Elvish written by Copilot, the rest was written by me with AI documentation.
This commit is contained in:
@@ -73,6 +73,13 @@ if [ -n "$GHOSTTY_BASH_INJECT" ]; then
|
||||
builtin unset GHOSTTY_BASH_RCFILE
|
||||
fi
|
||||
|
||||
# Add Ghostty binary to PATH if the path feature is enabled
|
||||
if [[ "$GHOSTTY_SHELL_FEATURES" == *"path"* && -n "$GHOSTTY_BIN_DIR" ]]; then
|
||||
if [[ ":$PATH:" != *":$GHOSTTY_BIN_DIR:"* ]]; then
|
||||
export PATH="$PATH:$GHOSTTY_BIN_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Sudo
|
||||
if [[ "$GHOSTTY_SHELL_FEATURES" == *"sudo"* && -n "$TERMINFO" ]]; then
|
||||
# Wrap `sudo` command to ensure Ghostty terminfo is preserved.
|
||||
|
Reference in New Issue
Block a user