summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:55:59 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:55:59 +0000
commit8486d438c8f59405a99ac3c6f607da1e41dddacc (patch)
treebb856856b7ac05439057f92c6fb43448961c4368 /Completion
parente0d1702d54545f116d4a9c82f23b33f37b96073d (diff)
downloadzsh-8486d438c8f59405a99ac3c6f607da1e41dddacc.tar.gz
zsh-8486d438c8f59405a99ac3c6f607da1e41dddacc.tar.xz
zsh-8486d438c8f59405a99ac3c6f607da1e41dddacc.zip
moved from Completion/User/_ls
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_ls92
1 files changed, 92 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls
new file mode 100644
index 000000000..a0216e50c
--- /dev/null
+++ b/Completion/Unix/Command/_ls
@@ -0,0 +1,92 @@
+#compdef ls gls
+# Ulrik Haugen 2001
+
+local arguments
+
+(( $+_is_gnu )) || typeset -gA _is_gnu
+
+if (( ! $+_is_gnu[$words[1]] )); then
+  if [[ $(_call_program version $words[1] --help </dev/null 2>/dev/null) = *gnu* ]]
+  then
+    _is_gnu[$words[1]]=yes
+  else
+    _is_gnu[$words[1]]=
+  fi
+fi
+
+arguments=( \
+  '*:files:_files' \
+  \
+  '(--all -A --almost-all)-a[all]' '(-a -A --almost-all)--all' \
+  '(--almost-all -a --all)-A[almost all]' '(-A -a --all)--almost-all' \
+  '(--ignore-backups)-B[ignore backups]' '(-B)--ignore-backups' \
+  '(--directory)-d[directory]' '(-d)--directory' \
+  {'(--ignore)-I+[ignore]','(-I)--ignore='}':ignore:' \
+  '(--dereference)-L[dereference]' '(-L)--dereference' \
+  '(--recursive)-R[recursive]' '(-R)--recursive' \
+  \
+  '(--no-group)-G[no group]' '(-G)--no-group' \
+  '(--human-readable -H --si)-h[human readable]' '(-h -H --si)--human-readable' \
+  '(--si -h --human-readable)-H[si]' '(-H -h --human-readable)--si' \
+  '(--inode)-i[inode]' '(-i)--inode' \
+  \
+  '(--format -o -1 -C -m -x)-l[long]' \
+  '(--format -l --no-group -1 -C -m -x)-o[no group, long]' \
+  '(--format -l -o -C -m -x)-1[single column]' \
+  '(--format -l -o -1 -m -x)-C[sort vertically]' \
+  '(--format -l -o -1 -C -x)-m[comma separated]' \
+  '(--format -l -o -1 -C -m)-x[sort horizontally]' \
+  '(-l -o -1 -C -m -x)--format=:format:(verbose long commas horizontal across vertical single-column)' \
+  \
+  '(--size -f)-s[size]' '(-s -f)--size' \
+  \
+  '(--time -u)-c[status change time]' \
+  '(--time -c)-u[access time]' \
+  '(-c -u)--time=:time:(ctime status use atime access)' \
+  \
+  '(-a --all -U -l --format -s --size -t --sort)-f[no sort, all]' \
+  '(--reverse)-r[reverse]' '(-r)--reverse' \
+  \
+  '(--sort -t -U -v -X)-S[sort by size]' \
+  '(--sort -S -U -v -X)-t[sort by time]' \
+  '(--sort -S -t -v -X)-U[no sort]' \
+  '(--sort -S -t -U -X)-v[sort by version]' \
+  '(--sort -S -t -U -v)-X[sort by extention]' \
+  '(-S -t -U -v -X)--sort=:sort:(size time none version extention)' \
+  \
+  '--color=-::color:(never always auto)' \
+  \
+  '(--classify --indicator-style -p --file-type)-F[classify]'  \
+  '(-F --indicator-style -p --file-type)--classify' \
+  '(--file-type --indicator-style -F --classify)-p[file type]' \
+  '(-p --indicator-style -F --classify)--file-type' \
+  '(-F --classify -p --file-type)--indicator-style=:indicator style:(none file-type classify)' \
+  \
+  '--full-time' \
+  \
+  '(--kilobytes --block-size)-k[kilobytes]' '(-k --blocksize)--kilobytes' \
+  '(-k --kilobytes)--block-size:blocksize:(1024)' \
+  \
+  '(--numeric-uid-gid)-n[numeric uid, gid]' \
+  {'(--tabsize)-T+[tabsize]','(-T)--tabsize='}':tabsize:(8)' \
+  {'(--width)-w+[width]','(-w)--width='}':width:(80)' \
+  \
+  '(--quoting-style --escape -N --literal -Q --quote-name)-b[escape]' \
+  '(--quoting-style -b -N --literal -Q --quote-name)--escape' \
+  '(--quoting-style -b --escape --literal -Q --quote-name)-N[literal]' \
+  '(--quoting-style -b --escape -N -Q --quote-name)--literal' \
+  '(--quoting-style -b --escape -N --literal --quote-name)-Q[quote name]' \
+  '(--quoting-style -b --escape -N --literal -Q)--quote-name' \
+  '(-b --escape -N --literal -Q --quote-name)--quoting-style=:quoting style:(literal shell shell-always c escape clocale locale)' \
+  \
+  '(--hide-control-chars --show-control-chars)-q[hide control chars]' \
+  '(-q --show-control-chars)--hide-control-chars' \
+  '(-q --hide-control-chars)--show-control-chars' \
+  '--version' \
+)
+
+# remove long options?
+[[ -z "$_is_gnu[$words[1]]" ]] &&
+    arguments=( ${${${${arguments:#*\)--*}:#--*}//--[^ )]#/}/\( #\)/} )
+
+_arguments -s $arguments