parent
c8a8852b0a
commit
8f21edd1e4
|
@ -30,8 +30,12 @@ let
|
|||
|
||||
nushellIntegration = ''
|
||||
def --env ya [args?] {
|
||||
let tmp = $"($env.TEMP)(char path_sep)yazi-cwd." + (random chars -l 5)
|
||||
let tmp = (mktemp -t "yazi-cwd.XXXXX")
|
||||
if ($args == null) {
|
||||
yazi --cwd-file $tmp
|
||||
} else {
|
||||
yazi $args --cwd-file $tmp
|
||||
}
|
||||
let cwd = (open $tmp)
|
||||
if $cwd != "" and $cwd != $env.PWD {
|
||||
cd $cwd
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
let
|
||||
shellIntegration = ''
|
||||
def --env ya [args?] {
|
||||
let tmp = $"($env.TEMP)(char path_sep)yazi-cwd." + (random chars -l 5)
|
||||
let tmp = (mktemp -t "yazi-cwd.XXXXX")
|
||||
if ($args == null) {
|
||||
yazi --cwd-file $tmp
|
||||
} else {
|
||||
yazi $args --cwd-file $tmp
|
||||
}
|
||||
let cwd = (open $tmp)
|
||||
if $cwd != "" and $cwd != $env.PWD {
|
||||
cd $cwd
|
||||
|
|
Loading…
Reference in a new issue