mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-25 22:17:33 +00:00
Use -- with cd so paths aren't treated as options
This commit is contained in:
parent
027d259c89
commit
fe553585e9
@ -17,7 +17,7 @@ function __zoxide_pwd() {
|
|||||||
# 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() {
|
||||||
# shellcheck disable=SC2164
|
# shellcheck disable=SC2164
|
||||||
\builtin cd "$@" {%- if echo %} && __zoxide_pwd {%- endif %}
|
\builtin cd -- "$@" {%- if echo %} && __zoxide_pwd {%- endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
|
@ -17,7 +17,7 @@ function __zoxide_pwd() {
|
|||||||
# 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() {
|
||||||
# shellcheck disable=SC2164
|
# shellcheck disable=SC2164
|
||||||
\builtin cd "$@" {%- if echo %} && __zoxide_pwd {%- endif %}
|
\builtin cd -- "$@" {%- if echo %} && __zoxide_pwd {%- endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
|
Loading…
Reference in New Issue
Block a user