summaryrefslogtreecommitdiff
path: root/etc/completions/_sort
blob: 6d6bc551859d9251494dce53f8fe309ffefa3f2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#compdef sort
## Quick, dirty and probably incomplete sort completion
## Copyright (C) 2008 by Daniel Friesel <derf@derf.homelinux.org>
## License: WTFPL <http://sam.zoy.org/wtfpl>

typeset -a arguments

arguments=(
	'-b[ignore leading blanks]'
	'-d[dictionary/alphabetical sort]'
	'-f[ignore case]'
	'-g[general numeric sort]'
	'-i[ignore non-printable characters]'
	'-M[sort by month]'
	'-n[string numeric sort]'
	'-R[random sort]'
	'--random-source=-[entropy source]:file:_files'
	'-r[reverse sort]'
	'-c[check if input is sorted]'
	'-C[quietly check if input is sorted]'
	'-k'
	'-m[merge sorted files]'
	'-o[output file]:output file:_files'
	'-s[stabilize sort]'
	'-S[set buffer size]:buffer size'
	'-t[set field separator]:field seprarator'
	'-T[set temporary directory]:tmpdir:_path_files -/'
	'-u[unique output]'
	'-z[end lines with 0 byte]'
)

_arguments -s $arguments