dotfiles/bin/l

22 lines
754 B
Bash
Executable file

#!/bin/bash -pe
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 1990-2021, Gerrit-John Los <los@lugons.org>
# for x in la ll ls lsf lsr lsw ltr ;do ln l "$x" ;done
opts=(--time-style=long-iso --color=never --quoting-style=literal)
case "${0##*/}" in
l) exec /bin/ls "${opts[@]}" -m "$@" ;;
la) exec /bin/ls "${opts[@]}" -la "$@" ;;
ll) exec /bin/ls "${opts[@]}" -lL "$@" ;;
ls) exec /bin/ls "${opts[@]}" "$@" ;;
lsf) exec /bin/ls "${opts[@]}" -F "$@" ;;
lsr) exec /bin/ls "${opts[@]}" -R "$@" ;;
lsw) exec /bin/ls "${opts[@]}" -lnL "$@" |
sed 's/^.[rwxst-]\+ \+[0-9]\+ \+[0-9]\+ \+[0-9]\+//' ;;
lsx) exec /bin/ls "${opts[@]}" -x "$@" ;;
ltr) exec /bin/ls "${opts[@]}" -lLtr "$@" ;;
*) exec /bin/ls "${opts[@]}" "$@" ;;
esac