Skip to content

Commit

Permalink
docs: do not leak cwd variable (#69)
Browse files Browse the repository at this point in the history
Co-authored-by: 三咲雅 · Misaki Masa <[email protected]>
  • Loading branch information
glensc and sxyazi authored Oct 19, 2024
1 parent 4245a44 commit 078ab9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ We suggest using this `y` shell wrapper that provides the ability to change the

```bash
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
Expand Down

0 comments on commit 078ab9e

Please sign in to comment.