From c79d075bd6b0b2ab5f45b6aeaf3189ce082d7fb9 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Nov 30 2021 16:01:08 +0000 Subject: Add zsh autocompletion. --- diff --git a/vagrant.spec b/vagrant.spec index 5e53c4a..71e93dd 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -197,6 +197,9 @@ install -D -m 0644 %{buildroot}%{vagrant_plugin_instdir}/contrib/bash/completion %{buildroot}%{bashcompletion_dir}/%{name} sed -i '/#!\// d' %{buildroot}%{bashcompletion_dir}/%{name} +install -D -m 0644 %{buildroot}%{vagrant_plugin_instdir}/contrib/zsh/_%{name} \ + %{buildroot}%{_datadir}/zsh/site-functions/_%{name} + # Install Vagrant macros mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/ @@ -445,6 +448,7 @@ end # TODO: Make more use of contribs. %{vagrant_plugin_instdir}/contrib %exclude %{vagrant_plugin_instdir}/contrib/bash +%exclude %{vagrant_plugin_instdir}/contrib/zsh/_%{name} # This is not the original .gemspec. %exclude %{vagrant_plugin_instdir}/vagrant.gemspec %{vagrant_plugin_instdir}/keys @@ -462,6 +466,9 @@ end %dir %{dirname:%{bashcompletion_dir}} %dir %{bashcompletion_dir} %{bashcompletion_dir}/%{name} +# By "owning" the site-functions dir, we don't need to Require zsh +%dir %{_datadir}/zsh +%{_datadir}/zsh/site-functions/_%{name} %{_rpmconfigdir}/macros.d/macros.%{name} %if %{with help2man} %{_mandir}/man1/%{name}.1* @@ -479,6 +486,7 @@ end * Mon Nov 15 2021 Pavel Valena - 2.2.19-1 - Upgrade Vagrant to 2.2.19. Resolves: rhbz#1980195 +- Add zsh autocompletion. * Fri Jul 23 2021 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild