From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9646 invoked by alias); 24 Aug 2018 05:59:58 -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: 43330 Received: (qmail 16180 invoked by uid 1010); 24 Aug 2018 05:59:58 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(205.235.26.22):SA:0(-1.6/5.0):. Processed in 0.409595 secs); 24 Aug 2018 05:59:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=7v4M=LH=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1535090392; bh=5IKw1jOwMp4ZwZ0PrvN3PZJWtz6yE7Up2eK9XERDXUg=; h=From:To:Subject:Date:From:Subject; b=m54RmbgLDGwsH/9AFdcaSlOXTT9rSX53MRnZzxBl06ewPcCJmUxXuIgL9JhNIId1c3afOKpGOIME9U1STOLiSahCeuv5eCcUxQYz06DQp+HYV+RX/oHaLF18NxlQMc80Raq8DAihqD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VYujmyEINITP4h7DM1LMcY1OjRLOoV QZbif11SANVazf03.6sMbunAVEThb1JOFk7AgEA_fhopCHxfucQLu2XYCGNtcuJrJnikW5b_p02P O9mAzMawQqbKGcQ83UwtcQs36Kly7vTpCngSh From: Oliver Kiddle To: Zsh workers Subject: PATCH: handle more options in cu completion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <33996.1535090387.1@hydra> Date: Fri, 24 Aug 2018 07:59:47 +0200 Message-ID: <33997-1535090387.315825@FNOy.-xdQ.fgmw> This expands the option handling in the cu completion. This covers netbsd and the cu from Ian Lance Taylor's UUCP tools. Oliver diff --git a/Completion/BSD/Command/_cu b/Completion/BSD/Command/_cu index 90447c0af..1fe08601f 100644 --- a/Completion/BSD/Command/_cu +++ b/Completion/BSD/Command/_cu @@ -1,26 +1,67 @@ #compdef cu -local args +local variant ign +local -a args -case $OSTYPE in +_pick_variant -r variant taylor='Taylor UUCP' $OSTYPE --version + +case $variant in openbsd*) args+=( "-d[don't block waiting for a carrier to be detected]" '-r[start cu in restricted mode - prevent local operations]' ) ;; - (net|free)bsd*) + taylor|(net|free)bsd*) args+=( + '(-o -P --parity)-e[use even parity]' + '(-e -P --parity)-o[use odd parity]' + ) + ;| + (net|free)bsd*) + args+=( '-t[connect via a hard-wired connection to a host on a dial-up line]' ) + ;| + taylor|netbsd*) + (( $#words > 2 )) && ign='!' + args+=( + "${ign}--help[display usage information]" + '(-s)--speed=[set line speed for the connection]:line speed [9600]:_baudrates' + '(-e -o -P)--parity=[set parity]:parity [none]:(even odd none)' + '(-h --halfduplex)'{-h,--halfduplex}'[echo characters locally]' + '--nostop[turn off XON/XOFF handling]' + '(-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))' + ) + ;| + taylor) + args+=( + "${ign}(-v --version)"{-v,--version}"[display version information]" + '(-n --prompt -c --phone)'{-n,--prompt}'[prompt for the phone number to use]' + '(-x --debug)-d[enter debugging mode]' + '(-d -x --debug)'{-x+,--debug=}'[turn on particular debugging types]:debug type:_sequence compadd - all abnormal chat handshake port config incoming outgoing' + '(-I --config)'{-I+,--config=}'[specify configuration file]:configuration file:_files' + '(1 -z --system)'{-z+,--system=}'[specify system to call]:system' + ) + ;; + netbsd*) + args+=( + '(-E --escape)-n+[disable escape character processing]' + '(-f -F --flow)'{-F+,--flow=}'[set flow control]:flow control:(hard soft none)' + '(-F --flow)-f[use no flow control]' + '(-e -o --parity)-P+[set parity]:parity [none]:(even odd none)' + ) + ;; + freebsd*) + args=( -A "-*" $args '-a[set the acu port]:acu' - '(-o)-e[use even parity]' '-h[echo characters locally]' - '(-e)-o[use odd parity]' - '-t[connect via a hard-wired connection to a host on a dial-up line]' ) ;; esac -_arguments -s -A '-*' $args \ - '-l[line to use]:line:(/dev/(cuaU#<->|ttyS<->)(N%c))' \ - '-s[line speed]:line speed:_baudrates' \ - '(-*)1:host:' +_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: :_guard "^-*" system'