about summary refs log tree commit diff
path: root/Functions/Misc/zls
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:28:57 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:28:57 +0000
commitf512bda08c3be58a774b9b16cb6649f08e159898 (patch)
treeb03e9a1e505b70facd43c1d03611761d40e5d8be /Functions/Misc/zls
parentf60c04f9c51cd985ec8959d8134f7ab6a41c2833 (diff)
downloadzsh-f512bda08c3be58a774b9b16cb6649f08e159898.tar.gz
zsh-f512bda08c3be58a774b9b16cb6649f08e159898.tar.xz
zsh-f512bda08c3be58a774b9b16cb6649f08e159898.zip
moved to ./Functions/Example/zls
Diffstat (limited to 'Functions/Misc/zls')
-rw-r--r--Functions/Misc/zls72
1 files changed, 0 insertions, 72 deletions
diff --git a/Functions/Misc/zls b/Functions/Misc/zls
deleted file mode 100644
index 22138cd6c..000000000
--- a/Functions/Misc/zls
+++ /dev/null
@@ -1,72 +0,0 @@
-# zls () {
-# simple internal ls using the stat module
-
-zmodload -i stat || return 1
-
-emulate -R zsh
-setopt localoptions
-
-local f opts='' L=L mod=: dirs list
-typeset -A stat
-
-dirs=()
-list=()
-
-while getopts ailLFdtuc f
-do
-    opts=$opts$f
-    if [[ $f == '?' ]] then
-	echo Usage: $0 [ -ailLFd ] [ filename ... ]
-	return 1
-    fi
-done
-shift OPTIND-1
-
-[[ $opts == *L* ]] && L=''
-[[ $opts == *F* ]] && mod=T$mod
-[[ $opts == *a* ]] && setopt globdots
-
-local time=mtime tmod=m
-[[ $opts == *u* ]] && time=atime tmod=a
-[[ $opts == *c* ]] && time=ctime tmod=c
-
-if ((! ARGC)) then
-    if [[ $opts = *t* ]]; then
-        set *(o$tmod)
-    else
-        set *
-    fi
-    opts=d$opts
-elif [[ $opts = *t* && $ARGC -gt 1 ]]; then
-    # another glaringly obvious zsh trick:  reorder the argv list
-    # by time, without messing up metacharacters inside
-    local n='$1'
-    for (( f = 2; f <= $ARGC; f++ )); do
-	n="$n|\$$f"
-    done
-    eval "argv=(($n)(o$tmod))"
-fi
-
-for f in $*
-do
-    stat -s$L -H stat -F "%b %e %H:%M" - $f || continue
-    if [[ $opts != *d* && $stat[mode] == d* ]] then
-	dirs=( $dirs $f )
-    elif [[ $opts == *l* ]] then
-	[[ $opts == *i* ]] && print -n "${(l:7:)stat[inode]} "
-	[[ -n $stat[link] ]] && f=( $f '->' $stat[link] ) || f=( $f($mod) )
-	print -r -- "$stat[mode] ${(l:3:)stat[nlink]} ${(r:8:)stat[uid]} " \
-		    "${(r:8:)stat[gid]} ${(l:8:)stat[size]} $stat[$time] $f"
-    else
-	f=( $f($mod) )
-	list=( "$list[@]" "${${(M)opts:%*i*}:+${(l:7:)stat[inode]} }$f" )
-    fi
-done
-(($#list)) && print -cr -- "$list[@]"
-while (($#dirs)) do
-    ((ARGC > $#dirs)) && echo
-    ((ARGC > 1)) && echo $dirs[1]:
-    (cd $dirs[1] && $0 -d$opts)
-    shift dirs
-done
-# }