repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by admin
nushell/modules/yazi.nu
Raw# Launch yazi file manager, such that nushell cd's into its last directory
export def --env yy [
...args # Arguments to pass on to yazi
] {
let tmp = (mktemp -t "yazi-cwd.XXXXXX")
yazi ...$args --cwd-file $tmp
let cwd = (open $tmp)
if $cwd != "" and $cwd != $env.PWD {
cd $cwd
}
rm -fp $tmp
}