Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920# shellcheck shell=sh
if ! command_exists lf; then returnfi
lfcd() { tmp="$(mktemp)" command lf -last-dir-path="$tmp" "$@" if [ -f "$tmp" ]; then dir="$(cat "$tmp")" rm -f "$tmp" if [ -d "$dir" ]; then if [ "$dir" != "$(pwd)" ]; then cd "$dir" fi fi fi}