mirror of
https://github.com/ajeetdsouza/zoxide.git
synced 2026-11-06 12:50:31 -04:00
Define __zoxide_doctor for all hooks in POSIX init (#1317)
This commit is contained in:
+7
-7
@@ -56,6 +56,13 @@ if [ "${PS1:=}" = "${PS1#*\$(__zoxide_hook)}" ]; then
|
||||
PS1="${PS1}\$(__zoxide_hook)"
|
||||
fi
|
||||
|
||||
{%- when InitHook::Pwd -%}
|
||||
\command printf "%s\n%s\n" \
|
||||
"zoxide: PWD hooks are not supported on POSIX shells." \
|
||||
" Use 'zoxide init posix --hook prompt' instead."
|
||||
|
||||
{%- endmatch %}
|
||||
|
||||
# Report common issues.
|
||||
__zoxide_doctor() {
|
||||
{%- if hook != InitHook::Prompt %}
|
||||
@@ -80,13 +87,6 @@ __zoxide_doctor() {
|
||||
{%- endif %}
|
||||
}
|
||||
|
||||
{%- when InitHook::Pwd -%}
|
||||
\command printf "%s\n%s\n" \
|
||||
"zoxide: PWD hooks are not supported on POSIX shells." \
|
||||
" Use 'zoxide init posix --hook prompt' instead."
|
||||
|
||||
{%- endmatch %}
|
||||
|
||||
{{ section }}
|
||||
# When using zoxide with --no-cmd, alias these internal functions as desired.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user