diff --git a/modules/programs/yazi.nix b/modules/programs/yazi.nix index 1f1f5bb4..a3d68726 100644 --- a/modules/programs/yazi.nix +++ b/modules/programs/yazi.nix @@ -9,7 +9,7 @@ let bashIntegration = '' function ya() { tmp="$(mktemp -t "yazi-cwd.XXXXX")" - yazi --cwd-file="$tmp" + yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then cd -- "$cwd" fi @@ -20,7 +20,7 @@ let fishIntegration = '' function ya set tmp (mktemp -t "yazi-cwd.XXXXX") - yazi --cwd-file="$tmp" + yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] cd -- "$cwd" end @@ -29,9 +29,9 @@ let ''; nushellIntegration = '' - def --env ya [] { + def --env ya [args?] { let tmp = $"($env.TEMP)(char path_sep)yazi-cwd." + (random chars -l 5) - yazi --cwd-file $tmp + yazi $args --cwd-file $tmp let cwd = (open $tmp) if $cwd != "" and $cwd != $env.PWD { cd $cwd diff --git a/tests/modules/programs/yazi/bash-integration-enabled.nix b/tests/modules/programs/yazi/bash-integration-enabled.nix index d54bbb88..9a8c18bf 100644 --- a/tests/modules/programs/yazi/bash-integration-enabled.nix +++ b/tests/modules/programs/yazi/bash-integration-enabled.nix @@ -4,7 +4,7 @@ let shellIntegration = '' function ya() { tmp="$(mktemp -t "yazi-cwd.XXXXX")" - yazi --cwd-file="$tmp" + yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then cd -- "$cwd" fi diff --git a/tests/modules/programs/yazi/fish-integration-enabled.nix b/tests/modules/programs/yazi/fish-integration-enabled.nix index 155684d5..02506b26 100644 --- a/tests/modules/programs/yazi/fish-integration-enabled.nix +++ b/tests/modules/programs/yazi/fish-integration-enabled.nix @@ -4,7 +4,7 @@ let shellIntegration = '' function ya set tmp (mktemp -t "yazi-cwd.XXXXX") - yazi --cwd-file="$tmp" + yazi $argv --cwd-file="$tmp" if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] cd -- "$cwd" end diff --git a/tests/modules/programs/yazi/nushell-integration-enabled.nix b/tests/modules/programs/yazi/nushell-integration-enabled.nix index 7b353228..aefffb9e 100644 --- a/tests/modules/programs/yazi/nushell-integration-enabled.nix +++ b/tests/modules/programs/yazi/nushell-integration-enabled.nix @@ -2,9 +2,9 @@ let shellIntegration = '' - def --env ya [] { + def --env ya [args?] { let tmp = $"($env.TEMP)(char path_sep)yazi-cwd." + (random chars -l 5) - yazi --cwd-file $tmp + yazi $args --cwd-file $tmp let cwd = (open $tmp) if $cwd != "" and $cwd != $env.PWD { cd $cwd diff --git a/tests/modules/programs/yazi/zsh-integration-enabled.nix b/tests/modules/programs/yazi/zsh-integration-enabled.nix index d27e868a..ef7960c5 100644 --- a/tests/modules/programs/yazi/zsh-integration-enabled.nix +++ b/tests/modules/programs/yazi/zsh-integration-enabled.nix @@ -4,7 +4,7 @@ let shellIntegration = '' function ya() { tmp="$(mktemp -t "yazi-cwd.XXXXX")" - yazi --cwd-file="$tmp" + yazi "$@" --cwd-file="$tmp" if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then cd -- "$cwd" fi