summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorRonan Pigott <rpigott@berkeley.edu>2019-08-06 21:00:36 -0700
committerRonan Pigott <rpigott@berkeley.edu>2019-08-06 22:49:44 -0700
commitf65ccde2c13faf6d9e1c593c8c312feed9175965 (patch)
tree8e8ca7f85e6ac147ddc5240024d5c19e39abb8ea /shell-completion
parent46ff70ca6959108facca65923b3b70c72822701e (diff)
downloadsystemd-f65ccde2c13faf6d9e1c593c8c312feed9175965.tar.gz
shell-completion: enable resolvectl zsh completion
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/zsh/_resolvectl (renamed from shell-completion/zsh/_systemd-resolve)26
-rw-r--r--shell-completion/zsh/meson.build2
2 files changed, 14 insertions, 14 deletions
diff --git a/shell-completion/zsh/_systemd-resolve b/shell-completion/zsh/_resolvectl
index 3b0ce311f2..e4c7929f44 100644
--- a/shell-completion/zsh/_systemd-resolve
+++ b/shell-completion/zsh/_resolvectl
@@ -1,4 +1,4 @@
-#compdef systemd-resolve -*- shell-script -*-
+#compdef resolvectl systemd-resolve -*- shell-script -*-
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
@@ -16,29 +16,29 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-(( $+functions[_systemd-resolve_protocols] )) ||
- _systemd-resolve_protocols() {
+(( $+functions[_resolvectl_protocols] )) ||
+ _resolvectl_protocols() {
local -a _protocol
_protocol=( $(_call_program protocol ${service} --legend=no --protocol help; echo help) )
_values 'protocol' "$_protocol[@]"
}
-(( $+functions[_systemd-resolve_types] )) ||
- _systemd-resolve_types() {
+(( $+functions[_resolvectl_types] )) ||
+ _resolvectl_types() {
local -a _type
_type=( $(_call_program type ${service} --legend=no --type help; echo help) )
_values 'type' "$_type[@]"
}
-(( $+functions[_systemd-resolve_classes] )) ||
- _systemd-resolve_classes() {
+(( $+functions[_resolvectl_classes] )) ||
+ _resolvectl_classes() {
local -a _class
_class=( $(_call_program class ${service} --legend=no --class help; echo help) )
_values 'class' "$_class[@]"
}
-(( $+functions[_systemd-resolve_none] )) ||
- _systemd-resolve_none() {
+(( $+functions[_resolvectl_none] )) ||
+ _resolvectl_none() {
_alternative : \
'domain:DNS address:' \
'address:email address:'
@@ -51,9 +51,9 @@ _arguments \
'-4[Resolve IPv4 addresses]' \
'-6[Resolve IPv6 addresses]' \
{-i+,--interface=}'[Look on interface]:interface:_net_interfaces' \
- {-p+,--protocol=}'[Look via protocol]:protocol:_systemd-resolve_protocols' \
- {-t+,--type=}'[Query RR with DNS type]:type:_systemd-resolve_types' \
- {-c+,--class=}'[Query RR with DNS class]:class:_systemd-resolve_classes' \
+ {-p+,--protocol=}'[Look via protocol]:protocol:_resolvectl_protocols' \
+ {-t+,--type=}'[Query RR with DNS type]:type:_resolvectl_types' \
+ {-c+,--class=}'[Query RR with DNS class]:class:_resolvectl_classes' \
'--service[Resolve services]' \
'--service-address=no[Do not resolve address for services]' \
'--service-txt=no[Do not resolve TXT records for services]' \
@@ -63,4 +63,4 @@ _arguments \
'--search=no[Do not use search domains]' \
'--statistics[Show resolver statistics]' \
'--reset-statistics[Reset resolver statistics]' \
- '*::default: _systemd-resolve_none'
+ '*::default: _resolvectl_none'
diff --git a/shell-completion/zsh/meson.build b/shell-completion/zsh/meson.build
index 792b06122f..6df9cc6ac2 100644
--- a/shell-completion/zsh/meson.build
+++ b/shell-completion/zsh/meson.build
@@ -33,7 +33,7 @@ if zshcompletiondir != 'no'
['_machinectl', 'ENABLE_MACHINED'],
['_networkctl', 'ENABLE_NETWORKD'],
['_systemd-inhibit', 'ENABLE_LOGIND'],
- ['_systemd-resolve', 'ENABLE_RESOLVE'],
+ ['_resolvectl', 'ENABLE_RESOLVE'],
['_systemd-tmpfiles', 'ENABLE_TMPFILES'],
['_timedatectl', 'ENABLE_TIMEDATED'],
]