-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path_ls
More file actions
executable file
·23 lines (23 loc) · 777 Bytes
/
_ls
File metadata and controls
executable file
·23 lines (23 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/zsh
# vim: ft=sh tw=80 sw=2:
if [[ -x =ls++ && $HURRY -lt 1 ]] && [[ $TERM != 'linux' ]]; then
ls++ "$@"
elif [[ -x =vdir ]]; then
vdir -bBGhHnNvXw $(($COLUMNS * 0.92 )) \
--quoting-style=shell --group-directories-first --format=vertical \
--dereference-command-line-symlink-to-dir \
--block-size=1k --show-control-chars --author \
--color --indicator-style=none
elif [[ -x =gls ]]; then
gls -hlv --group-directories-first --color--time=ctime --time-style=+%s
elif [[ -x =ls ]] && [[ =ls != $0 ]]; then
ls -hlv --group-directories-first --color--time=ctime --time-style=+%s
else
perl -e '
$\=$/;
print for map {
-d $_ "\e[34m$_\e[1m/\e[m" : -x $_ ? "\e[33m$_\e[m" : $_ }
sort { lc $b cmp lc $a }
glob("*")
'
fi