From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 77f5bc61 for ; Sat, 17 Nov 2018 02:06:20 +0000 (UTC) Received: (qmail 16405 invoked by alias); 17 Nov 2018 02:06:03 -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: List-Unsubscribe: X-Seq: 43830 Received: (qmail 13261 invoked by uid 1010); 17 Nov 2018 02:06:03 -0000 X-Qmail-Scanner-Diagnostics: from ipmail03.adl2.internode.on.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(150.101.137.141):SA:0(-2.6/5.0):. Processed in 2.250479 secs); 17 Nov 2018 02:06:03 -0000 X-Envelope-From: darius@dons.net.au X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f From: "O'Connor, Daniel" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Date: Sat, 17 Nov 2018 12:12:32 +1030 Subject: Fix cu completion for OSX Message-Id: To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3445.101.1) X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 Hi, I use cu for Arduino stuff and habitually type cu -l /dev/cu. and = get annoyed it doesn't match anything. OSX has ttys named cu.* and tty.* and uses Taylor CU. This patch works for me (tm). --- _cu.orig 2018-11-17 11:54:18.000000000 +1030 +++ _cu 2018-11-17 12:07:43.000000000 +1030 @@ -32,7 +32,7 @@ '(-E --escape)'{-E+,--escape=3D}'[specify escape = character]:escape character [~]' '(-a -p --port)'{-a+,-p+,--port=3D}'[specify the port]:port' '(-c --phone -n --prompt)'{-c+,--phone=3D}'[specify phone number = to call]:phone number' - '(1 -l -z --system)--line=3D[specify line to = use]:line:(/dev/(cuaU#<->|ttyS<->|tty.*)(N%c))' + '(1 -l -z --system)--line=3D[specify line to = use]:line:(/dev/(cuaU#<->|ttyS<->|tty.*|cu.*)(N%c))' ) ;| taylor) @@ -63,5 +63,5 @@ _arguments -s $args \ '(--speed)-s+[set line speed for the connection]:line speed = [9600]:_baudrates' \ - '(1 --line -z --system)-l+[specify line to = use]:line:(/dev/(cuaU#<->|ttyS<->|tty.*)(N%c))' \ + '(1 --line -z --system)-l+[specify line to = use]:line:(/dev/(cuaU#<->|ttyS<->|tty.*|cu.*)(N%c))' \ '1: :_guard "^-*" system' -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum