diff options
Diffstat (limited to '')
-rwxr-xr-x | pkgs/by-name/ll/ll/ll.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/by-name/ll/ll/ll.sh b/pkgs/by-name/ll/ll/ll.sh index f689ba44..9bec7eaf 100755 --- a/pkgs/by-name/ll/ll/ll.sh +++ b/pkgs/by-name/ll/ll/ll.sh @@ -8,7 +8,11 @@ last_directory="$(mktemp)" command lf -last-dir-path="$last_directory" "$@" dir="$(cat "$last_directory")" -cd "$dir" || die "$dir does not exist!" -rm "$last_directory" +if cd "$dir"; then + echo "$dir" >"$XDG_RUNTIME_DIR/ll/last_directory" +else + die "$dir does not exist!" +fi +rm "$last_directory" # vim: ft=sh |