about summary refs log tree commit diff
path: root/Completion/Unix/Command/_sort
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-05-13 16:08:35 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-05-13 16:08:35 +0000
commit547adf2021e2e57e421d27e5620170a8751d4274 (patch)
treec86db928284b551f8616bb76fc5263b8f9a8148b /Completion/Unix/Command/_sort
parent8a30b5f0df3809bb70c28b786ac30e5cdd169693 (diff)
downloadzsh-547adf2021e2e57e421d27e5620170a8751d4274.tar.gz
zsh-547adf2021e2e57e421d27e5620170a8751d4274.tar.xz
zsh-547adf2021e2e57e421d27e5620170a8751d4274.zip
25018: Omari Norman: completion for awk, join, sort
Diffstat (limited to 'Completion/Unix/Command/_sort')
-rw-r--r--Completion/Unix/Command/_sort31
1 files changed, 31 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_sort b/Completion/Unix/Command/_sort
new file mode 100644
index 000000000..1ea5a6e40
--- /dev/null
+++ b/Completion/Unix/Command/_sort
@@ -0,0 +1,31 @@
+#compdef sort
+
+# zsh completions for GNU sort version 5.97
+# limitation: --key does not work exactly right
+local arguments
+
+arguments=(
+    '(-b --ignore-leading-blanks)'{-b,--ignore-leading-blanks}'[ignore leading blanks]'
+    '(-d --dictionary-order)'{-d,--dictionary-order}'[consider only blanks and alphanumeric characters]'
+    '(-f --ignore-case)'{-f,--ignore-case}'[fold lower case to upper case characters]'
+    '(-g --general-numeric-sort)'{-g,--general-numeric-sort}'[compare according to general numeric value]'
+    '(-i --ignore-nonprinting)'{-i,--ignore-nonprinting}'[consider only printable characters]'
+    '(-M --month-sort)'{-M,--month-sort}"[compare (unknown) < 'JAN' < ... < 'DEC']"
+    '(-n --numeric-sort)'{-n,--numeric-sort}'[compare according to string numerical value]'
+    '(-r --reverse)'{-r,--reverse}'[reverse the result of comparisons]'
+    '(-c --check)'{-c,--check}'[check whether input is sorted; do not sort]'
+    '(-k --key)'{-k+,--key=}'[start a key at POS1, end it as POS2 (origin 1)]:key:'
+    '(-m --merge)'{-m,--merge}'[merge already sorted files; do not sort]'
+    '(-o --output)'{-o+,--output=}'[write result to FILE instead of standard output]:filename:_files'
+    '(-s --stable)'{-s+,--stable=}'[stabilize sort by disabling last-resort comparison]'
+    '(-S --buffer-size)'{-S+,--buffer-size=}'[use SIZE for main memory buffer]:size:'
+    '(-t --field-separator)'{-t+,--field-separator=}'[use SEP instead of non-blank to blank transition]:separator:'
+    '(-T --temporary-directory)'{-T+,--temporary-directory=}'[use DIR for temporaries, not $TMPDIR or /tmp; multiple options specify multiple directories]:directory'
+    '(-u --unique)'{-u,--unique}'[with -c, check for strict ordering; without -c, output only the first of an equal run]'
+    '(-z --zero-terminated)'{-z,--zero-terminated}'[end lines with 0 byte, not newline]'
+    --help'[display help and exit]'
+    --version'[output version information and exit]'
+    '*:filename:_files'
+    )
+
+_arguments -s $arguments