1- # compdef systemd-resolve -*- shell-script -*-
1+ # compdef resolvectl systemd-resolve -*- shell-script -*-
22# SPDX-License-Identifier: LGPL-2.1+
33#
44# This file is part of systemd.
1616# You should have received a copy of the GNU Lesser General Public License
1717# along with systemd; If not, see <http://www.gnu.org/licenses/>.
1818
19- (( $+ functions[_systemd - resolve_protocols ] )) ||
20- _systemd-resolve_protocols () {
19+ (( $+ functions[_resolvectl_protocols ] )) ||
20+ _resolvectl_protocols () {
2121 local -a _protocol
2222 _protocol=( $( _call_program protocol ${service} --legend=no --protocol help ; echo help) )
2323 _values ' protocol' " $_protocol [@]"
2424 }
2525
26- (( $+ functions[_systemd - resolve_types ] )) ||
27- _systemd-resolve_types () {
26+ (( $+ functions[_resolvectl_types ] )) ||
27+ _resolvectl_types () {
2828 local -a _type
2929 _type=( $( _call_program type ${service} --legend=no --type help ; echo help) )
3030 _values ' type' " $_type [@]"
3131 }
3232
33- (( $+ functions[_systemd - resolve_classes ] )) ||
34- _systemd-resolve_classes () {
33+ (( $+ functions[_resolvectl_classes ] )) ||
34+ _resolvectl_classes () {
3535 local -a _class
3636 _class=( $( _call_program class ${service} --legend=no --class help ; echo help) )
3737 _values ' class' " $_class [@]"
3838 }
3939
40- (( $+ functions[_systemd - resolve_none ] )) ||
41- _systemd-resolve_none () {
40+ (( $+ functions[_resolvectl_none ] )) ||
41+ _resolvectl_none () {
4242 _alternative : \
4343 ' domain:DNS address:' \
4444 ' address:email address:'
@@ -51,9 +51,9 @@ _arguments \
5151 ' -4[Resolve IPv4 addresses]' \
5252 ' -6[Resolve IPv6 addresses]' \
5353 {-i+,--interface=}' [Look on interface]:interface:_net_interfaces' \
54- {-p+,--protocol=}' [Look via protocol]:protocol:_systemd-resolve_protocols ' \
55- {-t+,--type=}' [Query RR with DNS type]:type:_systemd-resolve_types ' \
56- {-c+,--class=}' [Query RR with DNS class]:class:_systemd-resolve_classes ' \
54+ {-p+,--protocol=}' [Look via protocol]:protocol:_resolvectl_protocols ' \
55+ {-t+,--type=}' [Query RR with DNS type]:type:_resolvectl_types ' \
56+ {-c+,--class=}' [Query RR with DNS class]:class:_resolvectl_classes ' \
5757 ' --service[Resolve services]' \
5858 ' --service-address=no[Do not resolve address for services]' \
5959 ' --service-txt=no[Do not resolve TXT records for services]' \
@@ -63,4 +63,4 @@ _arguments \
6363 ' --search=no[Do not use search domains]' \
6464 ' --statistics[Show resolver statistics]' \
6565 ' --reset-statistics[Reset resolver statistics]' \
66- ' *::default: _systemd-resolve_none '
66+ ' *::default: _resolvectl_none '
0 commit comments