diff --git a/opentofu.changes b/opentofu.changes index 64995a5..31bbc6d 100644 --- a/opentofu.changes +++ b/opentofu.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 17 06:57:26 UTC 2024 - Christian Goll + +- added global bash completion + ------------------------------------------------------------------- Wed May 08 16:22:29 UTC 2024 - opensuse_buildservice@ojkastl.de diff --git a/opentofu.spec b/opentofu.spec index b755ef7..1723379 100644 --- a/opentofu.spec +++ b/opentofu.spec @@ -28,6 +28,7 @@ URL: https://github.com/opentofu/opentofu Source: %{name}-%{version}.tar.gz Source1: vendor.tar.gz Source99: opentofu-rpmlintrc +BuildRequires: bash-completion BuildRequires: golang-packaging BuildRequires: golang(API) >= 1.21 # See: https://github.com/hashicorp/opentofu/issues/22807 @@ -57,10 +58,15 @@ go build \ %install # Install the binary. install -D -m 0755 bin/%{executable_name} "%{buildroot}/%{_bindir}/%{executable_name}" +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/ +cat > %{buildroot}%{_datadir}/bash-completion/completions/%{executable_name} <