From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22788 invoked by alias); 27 Oct 2013 16:07:40 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31909 Received: (qmail 10320 invoked from network); 27 Oct 2013 16:07:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Biglobe-Sender: From: "Jun T." Content-Type: multipart/mixed; boundary="Apple-Mail=_C3805B87-0917-4105-BBBF-3329E28B4F84" Subject: completion file for the command 'cat' Message-Id: <6282BB94-2FB5-42AD-BD99-0A508966992E@kba.biglobe.ne.jp> Date: Mon, 28 Oct 2013 01:06:55 +0900 To: zsh-workers@zsh.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1816\)) X-Mailer: Apple Mail (2.1816) --Apple-Mail=_C3805B87-0917-4105-BBBF-3329E28B4F84 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Attached is a completion function for the command 'cat'. Only Linux and Mac OS X (and relatives) are supported seriously. --Apple-Mail=_C3805B87-0917-4105-BBBF-3329E28B4F84 Content-Disposition: attachment; filename=_cat Content-Type: application/octet-stream; name="_cat" Content-Transfer-Encoding: 7bit #compdef cat local -a args if _pick_variant gnu=GNU unix --version; then args=( '(-A --show-all)'{-A,--show-all}'[equivalent to -vET]' '(-b --number-nonblank -n --number)'{-b,--number-nonblank}'[number nonempty output lines, overrides -n]' '-e[equivalent to -vE]' '(-E --show-ends)'{-E,--show-ends}'[display $ at end of each line]' '(-n --number)'{-n,--number}'[number all output lines]' '(-s --squeeze-blank)'{-s,--squeeze-blank}'[suppress repeated empty output lines]' '-t[equivalent to -vT]' '(-T --show-tabs)'{-T,--show-tabs}'[display TAB characters as ^I]' '-u[ignored]' '(-v --show-nonprinting)'{-v,--show-nonprinting}'[use ^ and M- notation, except for LFD and TAB]' '(- : *)--help[display help and exit]' '(- : *)--version[output version information and exit]' '*:files:_files' ) elif [[ "$OSTYPE" == (freebsd|dragonfly|darwin)* ]]; then args=( '(-n)-b[number non-blank output lines]' '(-v)-e[display $ at the end of each line (implies -v)]' '-n[number all output lines]' '-s[squeeze multiple blank lines into one]' '(-v)-t[display tab as ^I (implies -v)]' '-u[do not buffer output]' '-v[display non-printing chars as ^X or M-a]' '(-)*:files:_files' ) else # POSIX reqires '-u', and most OSes may support '-n' args=( '-n[number all output lines]' '-u[do not buffer output]' '*:files:_files' ) fi _arguments -s -S : $args --Apple-Mail=_C3805B87-0917-4105-BBBF-3329E28B4F84--