From 7b13ba964b1f59b75f900af063e0b7306d63f6b77db85dc35413bafdce950a70 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Sat, 18 May 2024 10:11:04 +0000 Subject: [PATCH] Accepting request 1174776 from home:mslacken:branches:systemsmanagement:opentofu - added global bash completion OBS-URL: https://build.opensuse.org/request/show/1174776 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:opentofu/opentofu?expand=0&rev=35 --- opentofu.changes | 5 +++++ opentofu.spec | 6 ++++++ 2 files changed, 11 insertions(+) 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} <