mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-27 02:56:28 +00:00
feat: add GHOSTTY_BIN_DIR to path via shell integration
This commit is contained in:
@@ -73,6 +73,14 @@ 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
|
||||
# Check if the directory is already in PATH
|
||||
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