From d466101481595b1559109fb08788eeabb73a8255 Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Wed, 2 Oct 2024 09:44:39 +1000 Subject: [PATCH] Remove "no_aliases" from zsh integration This seems to prevent aliases working for the whole shell session. Removing the option seems to restore alias function while preserving shell integration. --- src/shell-integration/zsh/ghostty-integration | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shell-integration/zsh/ghostty-integration b/src/shell-integration/zsh/ghostty-integration index 662d5febb..7dc80f6b6 100755 --- a/src/shell-integration/zsh/ghostty-integration +++ b/src/shell-integration/zsh/ghostty-integration @@ -37,7 +37,7 @@ # builtins with `builtin` to avoid accidentally invoking user-defined functions. # We avoid `function` reserved word as an additional defensive measure. -builtin emulate -L zsh -o no_warn_create_global -o no_aliases +builtin emulate -L zsh -o no_warn_create_global [[ -o interactive ]] || builtin return 0 # non-interactive shell (( ! $+_ghostty_state )) || builtin return 0 # already initialized @@ -82,7 +82,7 @@ builtin typeset -ag precmd_functions precmd_functions+=(_ghostty_deferred_init) _ghostty_deferred_init() { - builtin emulate -L zsh -o no_warn_create_global -o no_aliases + builtin emulate -L zsh -o no_warn_create_global # The directory where ghostty-integration is located: /../shell-integration/zsh. builtin local self_dir="${functions_source[_ghostty_deferred_init]:A:h}" @@ -90,7 +90,7 @@ _ghostty_deferred_init() { # Enable semantic markup with OSC 133. _ghostty_precmd() { builtin local -i cmd_status=$? - builtin emulate -L zsh -o no_warn_create_global -o no_aliases + builtin emulate -L zsh -o no_warn_create_global # Don't write OSC 133 D when our precmd handler is invoked from zle. # Some plugins do that to update prompt on cd. @@ -164,7 +164,7 @@ _ghostty_deferred_init() { } _ghostty_preexec() { - builtin emulate -L zsh -o no_warn_create_global -o no_aliases + builtin emulate -L zsh -o no_warn_create_global # This can potentially break user prompt. Oh well. The robustness of # this code can be improved in the case prompt_subst is set because