# [PATCH/RFC] Ship bash completion package in RPMs

3 messages from 2010-03-19 to 2010-03-19. Participants: Ian Ward Comfort, Ben Walton.
Thread: https://gitlist.dev/t/23084

## Ian Ward Comfort, 2010-03-19 18:26

Subject: [PATCH/RFC] Ship bash completion package in RPMs
Message-ID: <1269023213-18432-1-git-send-email-icomfort@stanford.edu>
URL: https://gitlist.dev/e/1269023213-18432-1-git-send-email-icomfort%40stanford.edu

```
RPM-based distributions tend to have bash. Let's add the bash completion
routines to our core RPM in the standard location.

---

... Unless this is undesirable because the completion support is in contrib/?
Anyway, having this upstream would save me some patching, so I thought I'd
give it a shot.

 git.spec.in |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/git.spec.in b/git.spec.in
index ee74a5e..d2527c3 100644
--- a/git.spec.in
+++ b/git.spec.in
@@ -127,6 +127,9 @@ find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'
 rm -rf $RPM_BUILD_ROOT%{_mandir}
 %endif
 
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
+install -m 644 -T contrib/completion/git-completion.bash $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/git
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -136,6 +139,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc README COPYING Documentation/*.txt
 %{!?_without_docs: %doc Documentation/*.html Documentation/howto}
 %{!?_without_docs: %doc Documentation/technical}
+%{_sysconfdir}/bash_completion.d
 
 %files svn
 %defattr(-,root,root)
-- 
1.7.0.2

```

## Ben Walton, 2010-03-19 18:43

Subject: Re: [PATCH/RFC] Ship bash completion package in RPMs
Message-ID: <1269023855-sup-5053@pinkfloyd.chass.utoronto.ca>
URL: https://gitlist.dev/e/1269023855-sup-5053%40pinkfloyd.chass.utoronto.ca
In-Reply-To: <1269023213-18432-1-git-send-email-icomfort@stanford.edu>

```
Excerpts from Ian Ward Comfort's message of Fri Mar 19 14:26:53 -0400 2010:

Hi Ian,

> RPM-based distributions tend to have bash. Let's add the bash
> completion routines to our core RPM in the standard location.

I'd like to see this change too and have been tempted to submit it
myself.

The only thing I'd (possibly) change, which speaks to your comments
about contrib/, would be to make it conditional, requiring the builder
to enable it specifically during the rpmbuild.  Alternately, it could
be split out to a git-completion subpackage?

Personally, I'm ok with what you've done here as we always do this
ourselves.

Thanks!
-Ben
-- 
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

```

## Ian Ward Comfort, 2010-03-19 18:52

Subject: Re: [PATCH/RFC] Ship bash completion package in RPMs
Message-ID: <14EFE50D-5ACC-4DA8-8DB9-1BBD5C338E0F@stanford.edu>
URL: https://gitlist.dev/e/14EFE50D-5ACC-4DA8-8DB9-1BBD5C338E0F%40stanford.edu
In-Reply-To: <1269023855-sup-5053@pinkfloyd.chass.utoronto.ca>

```
On 19 Mar 2010, at 11:43 AM, Ben Walton wrote:
> Excerpts from Ian Ward Comfort's message of Fri Mar 19 14:26:53  
> -0400 2010:
>> RPM-based distributions tend to have bash. Let's add the bash  
>> completion routines to our core RPM in the standard location.
>
> I'd like to see this change too and have been tempted to submit it  
> myself.
>
> The only thing I'd (possibly) change, which speaks to your comments  
> about contrib/, would be to make it conditional, requiring the  
> builder to enable it specifically during the rpmbuild.  Alternately,  
> it could be split out to a git-completion subpackage?

I'd be happy to implement either of these alternatives, if we can  
gather a reasonable consensus around either.

-- 
Ian Ward Comfort <icomfort@stanford.edu>
Systems Team Lead, Academic Computing Services, Stanford University

```
