Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: update mtr completion to 0.92
- X-seq: zsh-workers 41742
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: update mtr completion to 0.92
- Date: Fri, 22 Sep 2017 09:33:18 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1506092494; bh=XFbXtqc7HevnxVVrCwCJFDEID8M78wTlu0R3yLdbt5g=; h=From:To:Subject:Date:From:Subject; b=WGmcmDmtYoBfEJFL1C5WfVk57N5HJKx//JcXTeZu65tDCLVY/65vPbSZbTDilLVUWEu/9jxBue20wiBt76tnI2ytWvevo/chNz27xMSinw4yo0mI5SdwIOhKddp4YR6OtJLIP8EpkbcG7W/goEgoUeTIS3C92/KKuAuHp8CuVI2GqlvjIyZ/Yb7EHIUZHmwoYVY6HkFlclXey9q+4am9Gykrh10YHSskGWB05fVSLYvv7v3i9C4x1ZvfvaNTX3raAXaGY8rm+Ntg6aVEW+zQOwtwXGjiSuVLd6HoTSDlwo/lqNeatiJcJr+N+GN3C4dVhy+Wpos1bt0QRbBHRwW+HQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Seems mtr got quite a lot of changes around version 0.88. This brings
the completion in line.
Oliver
diff --git a/Completion/Unix/Command/_mtr b/Completion/Unix/Command/_mtr
index 5eda9bc1a..806e344d1 100644
--- a/Completion/Unix/Command/_mtr
+++ b/Completion/Unix/Command/_mtr
@@ -1,22 +1,60 @@
#compdef mtr
-_arguments -C \
- '(-h --help)'{-h,--help}'[help]' \
- '(-v --version)'{-v,--version}'[version]' \
- '(-r --report)'{-r,--report}'[report mode]' \
- '(-w --report-wide)'{-w,--report-wide}'[wide report mode\: do not truncate hostnames]' \
- '(-c --report-cycles)'{-c,--report-cycles}'[report cycles]:number of pings' \
- '(-s --psize)'{-s,--psize}'[packet size]:number of bytes' \
- '(-t --curses)'{-t,--curses}'[curses UI]' \
- '(-e --mpls)'{-e,--mpls}'[display ICMP MPLS information]' \
- '(-o --order)'{-o,--order}'[order output fields]:fields order' \
- '(-n --no-dns)'{-n,--no-dns}'[no DNS lookups]' \
- '(-g --gtk)'{-g,--gtk}'[GTK+ UI]' \
- '(-p --split)'{-p,--split}'[output for a split-user interface]' \
- '(-l --raw)'{-l,--raw}'[raw output format]' \
- '(-a --address)'{-a,--address}'[source address]:source IP:_hosts' \
- '(-i --interval)'{-i,--interval}'[ping interval]:number of seconds' \
- '-u[use UDP instead of ICMP echo]' \
- '-4[use IPv4 only]' \
- '-6[use IPv6 only]' \
- ':destination host:_hosts'
+_arguments -s -S \
+ '(H -F --filename)'{-F,--filename}'[read hostnames from a file]' \
+ '(H -6)-4[use IPv4 only]' \
+ '(H -4)-6[use IPv6 only]' \
+ '(H -a --address)'{-a+,--address=}'[bind outgoing packets to specific interface]:source IP:_hosts' \
+ '(H -f --first-ttl)'{-f+,--first-ttl=}'[specify TTL to start]:TTL [1]' \
+ '(H -m --max-ttl)'{-m+,--max-ttl=}'[specify maximum number of hops to probe]:hops [30]' \
+ '(H -U --max-unknown)'{-U+,--max-unknown=}'[specify maximum unknown hosts]:maximum [5]' \
+ '(H -P --port)'{-P+,--port=}'[specify target port for TCP, SCTP or UDP]:port' \
+ '(H -L --localport -T --tcp -S --sctp)'{-L+,--localport=}'[specify source port number for UDP]' \
+ '(H -s --psize 2)'{-s+,--psize=}'[packet size]:packet size (bytes)' \
+ '(H -B --bitpattern)'{-B+,--bitpattern=}'[specify bit pattern to use in payload]:number (0-255)' \
+ '(H -i --interval)'{-i+,--interval=}'[specify ping interval]:interval (seconds)' \
+ '(H -G --gracetime)'{-G+,--gracetime=}'[specify time to wait for responses]:wait time (seconds)' \
+ '(H -Q --tos)'{-Q+,--tos=}'[specify type of service for IP header]:tos (0-255)' \
+ '(H -e --mpls)'{-e,--mpls}'[display ICMP MPLS information]' \
+ '(H -Z --timeout)'{-Z+,--timeout=}'[specify how long to keep probe sockets open before giving up on the connection]:timeout (seconds)' \
+ '(H -M --mark)'{-M+,--mark=}'[mark each sent packet]:mark' \
+ '(H -r --report)'{-r,--report}'[report mode]' \
+ '(H -w --report-wide)'{-w,--report-wide}"[wide report mode\: don't truncate hostnames]" \
+ '(H -c --report-cycles)'{-c+,--report-cycles=}'[report cycles]:number of pings' \
+ '(H)--displaymode=[select initial display mode]:display mode:((0\:statistics 1\:stripchart\ with\ latency 2\:stripchart\ without\ latency))' \
+ '(H -n --no-dns)'{-n,--no-dns}'[no DNS lookups]' \
+ '(H -b --show-ips)'{-b,--show-ips}'[show both IP numbers and host names]' \
+ '(H -o --order)'{-o+,--order=}'[specify order of output fields]: :_values -S "" "field order"
+ "L[loss ratio]"
+ "D[dropped packets]"
+ "R[received packets]"
+ "S[sent packets]"
+ "N[newest RTT]"
+ "B[min/best RTT]"
+ "A[average RTT]"
+ "W[max/worst RTT]"
+ "V[standard deviation]"
+ "G[geometric mean]"
+ "J[current jitter]"
+ "M[jitter mean/average]"
+ "X[worst jitter]"
+ "I[interarrival jitter]"' \
+ '(H -z --aslookup -y --ipinfo)'{-y+,--ipinfo=}'[select IP information in output]:information:((0\:display\ AS\ number 1\:display\ IP\ prefix 2\:display\ country\ code 3\:display\ RIR 4\:display\ allocation\ date))' \
+ '(H -y --ipinfo -z --aslookup)'{-z,--aslookup}'[display AS number]' \
+ '(H)1:destination host:_hosts' \
+ '(H)2:packet size (bytes)' \
+ + '(H)' \
+ '(- 1 2)'{-h,--help}'[display help information]' \
+ '(- 1 2)'{-v,--version}'[display version information]' \
+ + '(proto)' \
+ '(H)'{-u,--udp}'[use UDP instead of ICMP echo]' \
+ '(H -s --psize)'{-T,--tcp}'[use TCP instead of ICMP echo]' \
+ '(H)'{-S,--sctp}'[use SCTP instead of ICMP echo]' \
+ + '(output)' \
+ '(H)'{-t,--curses}'[curses UI]' \
+ '(H)'{-g,--gtk}'[GTK+ UI]' \
+ '(H)'{-p,--split}'[output for a split-user interface]' \
+ '(H)'{-l,--raw}'[output raw format]' \
+ '(H)'{-C,--csv}'[output comma separated values]' \
+ '(H)'{-j,--json}'[output JSON]' \
+ '(H)'{-x,--xml}'[output XML]'
.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author