about summary refs log tree commit diff stats
path: root/home-manager/packages/scripts/wrappers/ll
blob: d177b34170dca7bbd04f8b8d6192fa0f9606cbdd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /bin/bash
export LLP=0
tmp="$(mktemp)"
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