mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-22 04:45:20 +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.
|
||||
function __zoxide_cd() {
|
||||
# shellcheck disable=SC2164
|
||||
\builtin cd "$@" {%- if echo %} && __zoxide_pwd {%- endif %}
|
||||
\builtin cd -- "$@" {%- if echo %} && __zoxide_pwd {%- endif %}
|
||||
}
|
||||
|
||||
{{ section }}
|
||||
|
@ -17,7 +17,7 @@ function __zoxide_pwd() {
|
||||
# cd + custom logic based on the value of _ZO_ECHO.
|
||||
function __zoxide_cd() {
|
||||
# shellcheck disable=SC2164
|
||||
\builtin cd "$@" {%- if echo %} && __zoxide_pwd {%- endif %}
|
||||
\builtin cd -- "$@" {%- if echo %} && __zoxide_pwd {%- endif %}
|
||||
}
|
||||
|
||||
{{ section }}
|
||||
|
Loading…
Reference in New Issue
Block a user