1 #compdef systemd-resolve
2 # SPDX-License-Identifier: LGPL-2.1+
5 # This file is part of systemd.
7 # Copyright © 2016 Zbigniew Jędrzejewski-Szmek
9 # systemd is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU Lesser General Public License as published by
11 # the Free Software Foundation; either version 2.1 of the License, or
12 # (at your option) any later version.
14 # systemd is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU Lesser General Public License
20 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 _protocol=( $(_call_program protocol ${service} --legend=no --protocol help; echo help) )
25 _values 'protocol' "$_protocol[@]"
30 _type=( $(_call_program type ${service} --legend=no --type help; echo help) )
31 _values 'type' "$_type[@]"
36 _class=( $(_call_program class ${service} --legend=no --class help; echo help) )
37 _values 'class' "$_class[@]"
40 _systemd-resolve_none() {
42 'domain:DNS address:' \
43 'address:email address:'
47 {-h,--help}'[Print a short help text and exit]' \
48 '--version[Print a short version string and exit]' \
49 '--legend=no[Do not show headers and footers]' \
50 '-4[Resolve IPv4 addresses]' \
51 '-6[Resolve IPv6 addresses]' \
52 {-i+,--interface=}'[Look on interface]:interface:_net_interfaces' \
53 {-p+,--protocol=}'[Look via protocol]:protocol:_dns_protocol' \
54 {-t+,--type=}'[Query RR with DNS type]:type:_dns_type' \
55 {-c+,--class=}'[Query RR with DNS class]:class:_dns_class' \
56 '--service[Resolve services]' \
57 '--service-address=no[Do not resolve address for services]' \
58 '--service-txt=no[Do not resolve TXT records for services]' \
59 '--openpgp[Query OpenPGP public key]' \
60 '--tlsa[Query TLS public key]' \
61 '--cname=no[Do not follow CNAME redirects]' \
62 '--search=no[Do not use search domains]' \
63 '--statistics[Show resolver statistics]' \
64 '--reset-statistics[Reset resolver statistics]' \
65 '*::default: _systemd-resolve_none'