tcsh: preserve any existing `precmd` alias
This commit is contained in:
parent
6f79755f1a
commit
efa22f644a
|
|
@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Zsh: avoid inserting a trailing space when cancelling interactive Space-Tab completions.
|
||||
- Bash: avoid blanking the prompt when cancelling interactive Space-Tab completions.
|
||||
- Bash/Fish/Zsh: avoid drawing a new line when Space-Tab completion finds no matches.
|
||||
- Tcsh: preserve any existing `precmd` alias instead of overwriting it.
|
||||
|
||||
## [0.9.9] - 2026-01-31
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,15 @@ alias __zoxide_hook 'set __zoxide_pwd_tmp = "`{{ pwd_cmd }}`"; test "$__zoxide_p
|
|||
{%- endif %}
|
||||
|
||||
# Initialize hook.
|
||||
alias precmd ';__zoxide_hook'
|
||||
set __zoxide_precmd = "`alias precmd`"
|
||||
if ( "$__zoxide_precmd" !~ *__zoxide_hook* ) then
|
||||
if ( "$__zoxide_precmd" == "" ) then
|
||||
alias precmd '__zoxide_hook'
|
||||
else
|
||||
alias precmd "$__zoxide_precmd"';__zoxide_hook'
|
||||
endif
|
||||
endif
|
||||
unset __zoxide_precmd
|
||||
|
||||
{%- endif %}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue