aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/la.sh
blob: e21ad8fb16d98580f52dc499d068b193cc3e64fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
# Run ls -A if we can (-A is not POSIX), ls -a otherwise
la() {
    # Prefer --almost-all (exclude "." and "..") if available
    if [ -e "$HOME"/.cache/ls/almost-all ] ; then
        set -- -A "$@"
    else
        set -- -a "$@"
    fi
    ls "$@"
}