From 03c0b99a4067c7a330612daf716a4a38b57d9de9 Mon Sep 17 00:00:00 2001 From: Paul Ackersviller Date: Mon, 26 Nov 2007 04:03:18 +0000 Subject: Merge of 24032, 24039: new completion onto 4.2 branch. --- Completion/Unix/Command/_cut | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Completion/Unix/Command/_cut (limited to 'Completion/Unix') diff --git a/Completion/Unix/Command/_cut b/Completion/Unix/Command/_cut new file mode 100644 index 000000000..7faad9d89 --- /dev/null +++ b/Completion/Unix/Command/_cut @@ -0,0 +1,57 @@ +#compdef cut + +typeset -A _cut_args + +if _pick_variant gnu="Free Soft" unix --version; then + case $LANG in + (de_DE.UTF-8) + _cut_args=( + bytes "nur diese Bytes ausgeben" + characters "nur diese Zeichen ausgeben" + delimiter "Delimiter anstelle von Tabulator als Trenner benutzen" + fields "nur diese Felder und alle Zeilen OHNE Trennzeichen ausgeben" + n "(ignoriert)" + complement "das Komplement der Menge der gewählten Bytes, Zeichen oder Felder bilden" + only-delimited "keine Zeilen ausgeben, die keinen Trenner enthalten" + output-delimiter "Zeichenkette als Ausgabetrennzeichen benutzen" + help "diese Hilfe anzeigen und beenden" + version "Versionsinformation anzeigen und beenden" + ) + ;; + (*) + _cut_args=( + bytes "select only these bytes" + characters "select only these characters" + delimiter "use DELIM instead of TAB for field delimiter" + fields "select only these fields and lines whitout the delimiter character" + n "(ignored)" + complement "complement the set of selected bytes, characters or fields" + only-delimited "do not print lines not containing delimiters" + output-delimiter "use STRING as the output delimiter" + help "display this help and exit" + version "output version information and exit" + ) + ;; + esac + + _arguments \ + '(--bytes -b)'{--bytes=,-b}'['$_cut_args[bytes]']' \ + '(--characters -c)'{--characters=,-c}'['$_cut_args[characters]']' \ + '(--delimiter -d)'{--delimiter=,-d}'['$_cut_args[delimiter]']' \ + '(--fields -f)'{--fields=,-f}'['$_cut_args[fields]']' \ + '-n['$_cut_args[n]']' \ + '--complement['$_cut_args[complement]']' \ + '(--only-delimited -s)'{--only-delimited=,-s}'['$_cut_args[only-delimited]']' \ + '--output-delimiter['$_cut_args[output-delimiter]']' \ + '--help['$_cut_args[help]']' \ + '--version['$_cut_args[version]']' +else + _arguments \ + '-b[list specifies byte positions]:list:' \ + '-c[list specifies character positions]:list:' \ + '-d[use alternate delimeter]:delimeter:' \ + '-f[list specifies fields]:list:' \ + '-n[do not split multi-byte characters]' \ + '-s[suppress lines with no delimeters]' \ + '*:file:_files' +fi -- cgit 1.4.1