docs: fix mktemp filename

This commit is contained in:
sxyazi 2023-08-11 14:38:41 +08:00
parent 2efe97d140
commit a5eed70872
No known key found for this signature in database

View File

@ -108,7 +108,7 @@ There is a wrapper of yazi, that provides the ability to change the current work
```bash ```bash
function ya() { function ya() {
tmp="$(mktemp -t "yazi-cwd")" tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi --cwd-file="$tmp" yazi --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd" cd -- "$cwd"