git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC] Make git-completion.bash a first-class citizen

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 8, 2008, 14:06 UTC
Message-ID
<alpine.LSU.1.00.0802081405280.11591@racer.site>
In-Reply-To
<E3983D26-5DAC-48CE-A261-7C424FCB2D64@zib.de>

This moves git-completion.bash out of contrib/, and installs it to $sharedir/git-completion/

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	On Fri, 8 Feb 2008, Steffen Prohaska wrote:
	
	> On Feb 8, 2008, at 1:25 PM, Johannes Schindelin wrote:
	> 
	> > On Fri, 8 Feb 2008, Steffen Prohaska wrote:
	> > 
	> > > This improved prompt is great.  I already miss it each time 
	> > > I switch back from next to master.
	> > 
	> > Maybe we (as in msysgit) should install the 
	> > git-completion.bash script into /share/git-core/?
	> 
	> Yes.
	How about this?
 Makefile                                           |    4 ++++
 .../git-completion.bash => git-completion.bash     |    0 
 2 files changed, 4 insertions(+), 0 deletions(-)
 rename contrib/completion/git-completion.bash => git-completion.bash (100%)
diff --git a/Makefile b/Makefile
index de8c752..77efc3f 100644
--- a/Makefile
+++ b/Makefile
@@ -168,6 +168,7 @@ gitexecdir = $(bindir)
 sharedir = $(prefix)/share
 template_dir = $(sharedir)/git-core/templates
 htmldir=$(sharedir)/doc/git-doc
+completiondir = $(sharedir)/git-completion
 ifeq ($(prefix),/usr)
 sysconfdir = /etc
 else
@@ -784,6 +785,7 @@ bindir_SQ = $(subst ','\'',$(bindir))
 mandir_SQ = $(subst ','\'',$(mandir))
 infodir_SQ = $(subst ','\'',$(infodir))
 gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
+completiondir_SQ = $(subst ','\'',$(completiondir))
 template_dir_SQ = $(subst ','\'',$(template_dir))
 htmldir_SQ = $(subst ','\'',$(htmldir))
 prefix_SQ = $(subst ','\'',$(prefix))
@@ -1067,6 +1069,8 @@ install: all
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
 	$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
 	$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'
+	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(completiondir_SQ)'
+	$(INSTALL) git-completion.bash '$(DESTDIR_SQ)$(completiondir_SQ)'
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 	$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_TCLTK
diff --git a/contrib/completion/git-completion.bash b/git-completion.bash
similarity index 100%
rename from contrib/completion/git-completion.bash
rename to git-completion.bash
-- 
1.5.4.1261.g18335
Previous: Steffen ProhaskaNext: Jakub Narebski
Message 11 of 16 in “command prompt script for current branch”
  1. Stephen SinclairFeb 6, 2008
  2. Junio C HamanoFeb 6, 2008
  3. Improve bash prompt to detect merge / rebase in progressRobin Rosenberg, Feb 6, 2008
  4. Robin RosenbergFeb 6, 2008
  5. Junio C HamanoFeb 6, 2008
  6. Robin RosenbergFeb 7, 2008
  7. Shawn O. PearceFeb 7, 2008
  8. Steffen ProhaskaFeb 8, 2008
  9. Johannes SchindelinFeb 8, 2008
  10. Steffen ProhaskaFeb 8, 2008
  11. Make git-completion.bash a first-class citizenJohannes Schindelin, Feb 8, 2008
  12. Jakub NarebskiFeb 6, 2008
  13. Mike HommeyFeb 6, 2008
  14. Jakub NarebskiFeb 6, 2008
  15. Stephen SinclairFeb 6, 2008
  16. Jakub NarebskiFeb 6, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.