* Fix cu completion for OSX
@ 2018-11-17 1:42 O'Connor, Daniel
0 siblings, 0 replies; only message in thread
From: O'Connor, Daniel @ 2018-11-17 1:42 UTC (permalink / raw)
To: zsh-workers
Hi,
I use cu for Arduino stuff and habitually type cu -l /dev/cu.<tab> 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=}'[specify escape character]:escape character [~]'
'(-a -p --port)'{-a+,-p+,--port=}'[specify the port]:port'
'(-c --phone -n --prompt)'{-c+,--phone=}'[specify phone number to call]:phone number'
- '(1 -l -z --system)--line=[specify line to use]:line:(/dev/(cuaU#<->|ttyS<->|tty.*)(N%c))'
+ '(1 -l -z --system)--line=[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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-17 2:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-17 1:42 Fix cu completion for OSX O'Connor, Daniel
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).