From 66831b948f606f8ddb05f53bcbc5c55082bc598c Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Mon, 13 Dec 2021 17:55:41 -0500
Subject: [PATCH] hadrian: Include bash completion script in bindist

See #20802.
---
 hadrian/src/Rules/BinaryDist.hs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs
index 914039d9e841..7db11dddd0ce 100644
--- a/hadrian/src/Rules/BinaryDist.hs
+++ b/hadrian/src/Rules/BinaryDist.hs
@@ -234,6 +234,11 @@ bindistRules = do
           -- shipping it
           removeFile (bindistFilesDir -/- mingwStamp)
 
+        -- Include bash-completion script in binary distributions. We don't
+        -- currently install this but merely include it for the user's
+        -- reference. See #20802.
+        copyDirectory ("utils" -/- "completion") bindistFilesDir
+
         -- These scripts are only necessary in the configure/install
         -- workflow which is not supported on windows.
         -- TODO: Instead of guarding against windows, we could offer the
-- 
GitLab