From 68a8685146f824bea4698cfb9110c26a771ac3e8 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 6 Aug 2001 14:42:02 +0000 Subject: share descriptions for long/short opts in more completions and other changes --- Completion/Unix/Command/_ls | 133 +++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 70 deletions(-) (limited to 'Completion/Unix/Command/_ls') diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls index 0e5625cd2..b9588c5f4 100644 --- a/Completion/Unix/Command/_ls +++ b/Completion/Unix/Command/_ls @@ -14,79 +14,72 @@ if (( ! $+_is_gnu[$words[1]] )); then 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 extension]' \ - '(-S -t -U -v -X)--sort=:sort:(size time none version extension)' \ - \ - '--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' \ +arguments=( + '(--all -a -A --almost-all)'{--all,-a}'[list entries starting with .]' + '(--almost-all -A -a --all)'{--almost-all,-A}'[list all except . and ..]' + '(--ignore-backups -B)'{--ignore-backups,-B}"[don't list entries ending with ~]" + '(--directory -d)'{--directory,-d}'[list directory entries instead of contents]' + '(--ignore,-I)'{--ignore,-I}"[don't list entires matching pattern]:pattern:" + '(--dereference -L)'{--dereference,-L}'[list referenced file for sym link]' + '(--recursive -R)'{--recursive,-R}'[list subdirectories recursively]' + + '(--no-group -G)'{--no-group,-G}'[inhibit display of group information]' + '(--human-readable -h -H --si)'{--human-readable,-h}'[print sizes in human readable form]' + '(--si -H -h --human-readable)'{--si,-H}'[sizes in human readable form; powers of 1000]' + '(--inode -i)'{--inode,-i}'[print file inode numbers]' + + '(--format -o -1 -C -m -x)-l[long listing]' + '(--format -l --no-group -G -1 -C -m -x)-o[no group, long]' + '(--format -l -o -C -m -x)-1[single column output]' + '(--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 -s -f)'{--size,-s}'[display size of each file in blocks]' + + '(--time -u)-c[status change time]' + '(--time -c)-u[access time]' + '(-c -u)--time=[specify time to show]:time:(ctime status use atime access)' + + '(-a --all -U -l --format -s --size -t --sort --full-time)-f[unsorted, all, short list]' + '(--reverse)'{--reverse,-r}'[reverse sort order]' + + '(--sort -t -U -v -X)-S[sort by size]' + '(--sort -S -U -v -X)-t[sort by modification time]' + '(--sort -S -t -v -X)-U[unsorted]' + '(--sort -S -t -U -X)-v[sort by version (filename treated numerically)]' + '(--sort -S -t -U -v)-X[sort by extension]' + '(-S -t -U -v -X)--sort=:sort:(size time none version extension)' + + '--color=-[control use of color]:color:(never always auto)' + + '(--classify -F --indicator-style -p --file-type)'{--classify,-F}'[append file type indicators]' + '(--file-type -p --indicator-style -F --classify)'{--file-type,-p}'[append file type indicators except *]' + '(-F --classify -p --file-type)--indicator-style=:indicator style:(none file-type classify)' + + '(-f)--full-time[list both full date and full time]' + + '(--kilobytes -k --block-size)'{--kilobytes,-k}'[use block size of 1k]' + '(-k --kilobytes)--block-size=[specify block size]:block size (bytes):(1024)' + + '(--numeric-uid-gid -n)'{--numeric-uid-gid,-n}'[numeric uid, gid]' + '(--tabsize -T)'{--tabsize=,-T+}'[specify tab size]:tab size' + '(--width -w)'{--width=,-w+}'[specify screen width]:screen width' + + '(--quoting-style -b --escape -N --literal -Q --quote-name)'{--escape,-b}'[print octal escapes for control characters]' + '(--quoting-style -b --escape -N --literal -Q --quote-name)'{--literal,-N}'[print raw characters]' + '(--quoting-style -b --escape -N --literal -Q --quote-name)'{--quote-name,-Q}'[quote names]' + '(-b --escape -N --literal -Q --quote-name)--quoting-style=:quoting style:(literal shell shell-always c escape clocale locale)' + + '(--hide-control-chars -q --show-control-chars)'{--hide-control-chars,-q}'[hide control chars]' + '(-q --hide-control-chars)--show-control-chars' + '--version[display version information]' + '*:files:_files' ) # remove long options? [[ -z "$_is_gnu[$words[1]]" ]] && - arguments=( ${${${${arguments:#*\)--*}:#--*}//--[^ )]#/}/\( #\)/} ) + arguments=( ${${${arguments:#(|*\))--*}//--[^ )]#/}/\( #\)/} ) _arguments -s $arguments -- cgit 1.4.1