diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index c45342274..7ae8acd69 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -11,7 +11,7 @@ let local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" } @@ -22,7 +22,7 @@ let set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - cd -- "$cwd" + builtin cd -- "$cwd" end rm -f -- "$tmp" end diff --git a/tests/modules/programs/yazi/bash-integration-enabled.nix b/tests/modules/programs/yazi/bash-integration-enabled.nix index ff9bc2f2b..ac2e49796 100644 --- a/tests/modules/programs/yazi/bash-integration-enabled.nix +++ b/tests/modules/programs/yazi/bash-integration-enabled.nix @@ -6,7 +6,7 @@ let local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" } diff --git a/tests/modules/programs/yazi/fish-integration-enabled.nix b/tests/modules/programs/yazi/fish-integration-enabled.nix index 02506b266..6d2b9fa31 100644 --- a/tests/modules/programs/yazi/fish-integration-enabled.nix +++ b/tests/modules/programs/yazi/fish-integration-enabled.nix @@ -6,7 +6,7 @@ let set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - cd -- "$cwd" + builtin cd -- "$cwd" end rm -f -- "$tmp" end diff --git a/tests/modules/programs/yazi/zsh-integration-enabled.nix b/tests/modules/programs/yazi/zsh-integration-enabled.nix index c8744146e..d5090a6a8 100644 --- a/tests/modules/programs/yazi/zsh-integration-enabled.nix +++ b/tests/modules/programs/yazi/zsh-integration-enabled.nix @@ -6,7 +6,7 @@ let local tmp="$(mktemp -t "yazi-cwd.XXXXX")" yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" + builtin cd -- "$cwd" fi rm -f -- "$tmp" }