fix resolves symlink on `cd` at zsh
This commit is contained in:
parent
ede1224259
commit
52175d8678
|
|
@ -18,10 +18,15 @@ function __zoxide_pwd() {
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
# cd + custom logic based on the value of _ZO_ECHO.
|
# cd + custom logic based on the values of _ZO_ECHO and _ZO_RESOLVE_SYMLINKS.
|
||||||
function __zoxide_cd() {
|
function __zoxide_cd() {
|
||||||
# shellcheck disable=SC2164
|
# shellcheck disable=SC2164
|
||||||
\builtin cd -- "$@" {%- if echo %} && __zoxide_pwd {%- endif %}
|
{%- if resolve_symlinks %}
|
||||||
|
\builtin cd -P -- "$@"
|
||||||
|
{%- else %}
|
||||||
|
\builtin cd -- "$@"
|
||||||
|
{%- endif %}
|
||||||
|
{%- if echo %} && __zoxide_pwd {% endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue