parent
d304543d2e
commit
8772cde987
|
|
@ -8,15 +8,28 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# pwd based on the value of _ZO_RESOLVE_SYMLINKS.
|
# pwd based on the value of _ZO_RESOLVE_SYMLINKS.
|
||||||
function __zoxide_pwd() {
|
{%- let pwd -%}
|
||||||
|
{%- if resolve_symlinks -%}
|
||||||
|
{%- let pwd = "\\builtin pwd -P" -%}
|
||||||
|
{%- else -%}
|
||||||
|
{%- let pwd = "\\builtin pwd -L" -%}
|
||||||
|
{%- endif -%}
|
||||||
{%- if cfg!(windows) %}
|
{%- if cfg!(windows) %}
|
||||||
\command cygpath -w "$(\builtin pwd -P)"
|
if \command -v cygpath >/dev/null
|
||||||
{%- else if resolve_symlinks %}
|
then
|
||||||
\builtin pwd -P
|
function __zoxide_pwd() {
|
||||||
|
\command cygpath -w "$({{ pwd }})"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
function __zoxide_pwd() {
|
||||||
|
{{ pwd }}
|
||||||
|
}
|
||||||
|
fi
|
||||||
{%- else %}
|
{%- else %}
|
||||||
\builtin pwd -L
|
function __zoxide_pwd() {
|
||||||
{%- endif %}
|
{{ pwd }}
|
||||||
}
|
}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
# cd + custom logic based on the value of _ZO_ECHO.
|
# cd + custom logic based on the value of _ZO_ECHO.
|
||||||
function __zoxide_cd() {
|
function __zoxide_cd() {
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,28 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# pwd based on the value of _ZO_RESOLVE_SYMLINKS.
|
# pwd based on the value of _ZO_RESOLVE_SYMLINKS.
|
||||||
__zoxide_pwd() {
|
{%- let pwd -%}
|
||||||
|
{%- if resolve_symlinks -%}
|
||||||
|
{%- let pwd = "\\command pwd -P" -%}
|
||||||
|
{%- else -%}
|
||||||
|
{%- let pwd = "\\command pwd -L" -%}
|
||||||
|
{%- endif -%}
|
||||||
{%- if cfg!(windows) %}
|
{%- if cfg!(windows) %}
|
||||||
\command cygpath -w "$(\command pwd -P)"
|
if \command -v cygpath >/dev/null
|
||||||
{%- else if resolve_symlinks %}
|
then
|
||||||
\command pwd -P
|
__zoxide_pwd() {
|
||||||
|
\command cygpath -w "$({{ pwd }})"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
__zoxide_pwd() {
|
||||||
|
{{ pwd }}
|
||||||
|
}
|
||||||
|
fi
|
||||||
{%- else %}
|
{%- else %}
|
||||||
\command pwd -L
|
__zoxide_pwd() {
|
||||||
{%- endif %}
|
{{ pwd }}
|
||||||
}
|
}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
# cd + custom logic based on the value of _ZO_ECHO.
|
# cd + custom logic based on the value of _ZO_ECHO.
|
||||||
__zoxide_cd() {
|
__zoxide_cd() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue