blob: b3f07eae5fffbce88871a57fa153ee80fdbc0a54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh
# New and better ls
# TODO: fix simlinks, flags break them for some reason
ls_new() {
LC_ALL=C $(which ls) -lAFh --color=always "$1" | awk '{
name = $9;
for (i = 10; i <= NF; i++) name = name " " $i;
print $1, $5, name
}' | column -t -l 3 -s ' ' | tail -n +2
}
dir="$1"
[ -z "$dir" ] && dir="$(pwd)"
ls_new "$dir"
|