{"thread":{"id":"43184","subject":"Re: Bash completion Issue?","startedAt":"2006-11-04T12:36:59Z","lastAt":"2006-11-05T11:45:14Z","messageCount":8,"participants":["Alan Chandler","Jakub Narebski","Shawn Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"297185","messageId":"200611041236.59989.alan@chandlerfamily.org.uk","threadId":"43184","inReplyTo":null,"subject":"Bash completion Issue?","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2006-11-04T12:36:59Z","receivedAt":"2006-11-04T12:36:59Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"I am experiencing (and have for some time) a strange effect with bash \ncompletion on my Debian (Unstable) system.  Is this a git problem, or \nsomething else?\n\nWhen I type a normal command on the bash command line (say emacs) followed by \nthe partial directory name the completion completes the directory and then \nadds a slash.  If I type a git command (say git update-index) with the same \npartial directory name it completes the directory, but then adds a space.  I \nhave to backspace, manually add the slash, before continuing with the next \ndirectory or filename.\n\nIn debian, there seems to be a directory /etc/bash_completion.d with files for \neach of the packages, and the debian git packages have entries in there.  So \nI assume they are derived from the completion work mentioned on this list.\n\nWhat seems strange to me is that nobody else has mentioned this before now.\n\n-- \nAlan Chandler\n"},{"id":"296490","messageId":"20061104184120.GB2311@spearce.org","threadId":"43184","inReplyTo":"200611041236.59989.alan@chandlerfamily.org.uk","subject":"Re: Bash completion Issue?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-11-04T18:41:20Z","receivedAt":"2006-11-04T18:41:20Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Alan Chandler <alan@chandlerfamily.org.uk> wrote:\n> When I type a normal command on the bash command line (say emacs) followed by \n> the partial directory name the completion completes the directory and then \n> adds a slash.  If I type a git command (say git update-index) with the same \n> partial directory name it completes the directory, but then adds a space.  I \n> have to backspace, manually add the slash, before continuing with the next \n> directory or filename.\n\nHmm.  I just tried 'git update-index' and it completed here for\nme as you want it to (this is with the current stock Git bash\ncompletion support).\n\nHowever we do some funny things when completing into trees.  E.g. the\ncompletion support for 'git ls-tree man:man<tab>' may seem a little\nstrange but it works well for my fingers.  I've never really had\nany problem with it.\n\nI think the only way we differ from normal bash completion is we\nsometimes don't add a space after fully completing a path name.\nUsually the user has to type the space in by hand.\n \n> In debian, there seems to be a directory /etc/bash_completion.d with files for \n> each of the packages, and the debian git packages have entries in there.  So \n> I assume they are derived from the completion work mentioned on this list.\n\nWhat completion script is it?  The one that is now shipped as part\nof Git has a header of the following, and resides in git.git as\ncontrib/completion/git-completion.bash:\n\n\t#\n\t# bash completion support for core Git.\n\t#\n\t# Copyright (C) 2006 Shawn Pearce\n\t# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).\n\t#\n\n> What seems strange to me is that nobody else has mentioned this before now.\n\nMaybe because you have a different completion script?\n\n-- \n"},{"id":"293990","messageId":"200611050033.07716.alan@chandlerfamily.org.uk","threadId":"43184","inReplyTo":"20061104184120.GB2311@spearce.org","subject":"Re: Bash completion Issue?","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2006-11-05T00:33:07Z","receivedAt":"2006-11-05T00:33:07Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Saturday 04 November 2006 18:41, Shawn Pearce wrote:\n> Alan Chandler <alan@chandlerfamily.org.uk> wrote:\n...\n> > In debian, there seems to be a directory /etc/bash_completion.d with\n> > files for each of the packages, and the debian git packages have entries\n> > in there.  So I assume they are derived from the completion work\n> > mentioned on this list.\n>\n> What completion script is it?  The one that is now shipped as part\n> of Git has a header of the following, and resides in git.git as\n> contrib/completion/git-completion.bash:\n>\n> \t#\n> \t# bash completion support for core Git.\n> \t#\n> \t# Copyright (C) 2006 Shawn Pearce\n> \t# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).\n> \t#\n\nWell I have something like this (with git 1.4.3.3)\n\n# 'git' bash completion and library routines used by porcelain completions.\n#\n# Copyright (c) Paolo Giarrusso, 2005\n# Copyright (c) Ben Clifford, 2005\n#\n# The master version is available at:\n#       http://www.hawaga.org.uk/gitcompletion.git\n\n\n>\n> > What seems strange to me is that nobody else has mentioned this before\n> > now.\n>\n> Maybe because you have a different completion script?\n\nSeems like it might be:-(\n\n\n-- \nAlan Chandler\n"},{"id":"297611","messageId":"20061105042849.GA3840@spearce.org","threadId":"43184","inReplyTo":"200611050033.07716.alan@chandlerfamily.org.uk","subject":"Re: Bash completion Issue?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-11-05T04:28:49Z","receivedAt":"2006-11-05T04:28:49Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Alan Chandler <alan@chandlerfamily.org.uk> wrote:\n> Well I have something like this (with git 1.4.3.3)\n> \n> # 'git' bash completion and library routines used by porcelain completions.\n> #\n> # Copyright (c) Paolo Giarrusso, 2005\n> # Copyright (c) Ben Clifford, 2005\n> #\n> # The master version is available at:\n> #       http://www.hawaga.org.uk/gitcompletion.git\n\nMaybe you can nicely ask the Debian maintainer to switch to using\nuse the completion script that is actually shipped with git 1.4.3.3?\n\n-- \n"},{"id":"295605","messageId":"200611050930.23455.alan@chandlerfamily.org.uk","threadId":"43184","inReplyTo":"20061105042849.GA3840@spearce.org","subject":"Re: Bash completion Issue?","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2006-11-05T09:30:23Z","receivedAt":"2006-11-05T09:30:23Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Sunday 05 November 2006 04:28, Shawn Pearce wrote:\n\n> Maybe you can nicely ask the Debian maintainer to switch to using\n> use the completion script that is actually shipped with git 1.4.3.3?\n\nIt seems to be a little bit more subtle than I first thought.\n\nThere is a separate 'git-completion' package which is not maintained by the \ngit maintainer (Gerrit Pape) and which has not been updated since August. Its \nthis package that contains the scripts.\n\nI'll file a bug report against it.\n-- \nAlan Chandler\n"},{"id":"295986","messageId":"200611051122.46971.alan@chandlerfamily.org.uk","threadId":"43184","inReplyTo":"200611050930.23455.alan@chandlerfamily.org.uk","subject":"Re: Bash completion Issue?","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2006-11-05T11:22:46Z","receivedAt":"2006-11-05T11:22:46Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Sunday 05 November 2006 09:30, Alan Chandler wrote:\n> On Sunday 05 November 2006 04:28, Shawn Pearce wrote:\n> > Maybe you can nicely ask the Debian maintainer to switch to using\n> > use the completion script that is actually shipped with git 1.4.3.3?\n>\n> It seems to be a little bit more subtle than I first thought.\n>\n> There is a separate 'git-completion' package which is not maintained by the\n> git maintainer (Gerrit Pape) and which has not been updated since August.\n> Its this package that contains the scripts.\n>\n> I'll file a bug report against it.\n\n removing the git-completion package and copying the bash completion script \nfrom /usr/share/doc/git-core/contrib/completion to /etc/bash_completion.d \nsolves the problem.  I am getting completion working fine now.\n-- \nAlan Chandler\n"},{"id":"295348","messageId":"20061105113115.GC4843@spearce.org","threadId":"43184","inReplyTo":"200611051122.46971.alan@chandlerfamily.org.uk","subject":"Re: Bash completion Issue?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-11-05T11:31:15Z","receivedAt":"2006-11-05T11:31:15Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Alan Chandler <alan@chandlerfamily.org.uk> wrote:\n>  removing the git-completion package and copying the bash completion script \n> from /usr/share/doc/git-core/contrib/completion to /etc/bash_completion.d \n> solves the problem.  I am getting completion working fine now.\n\nGood.  :-)\n\nLet us know if there's anything you'd like to see in the bash\ncompletion...  I just sent out two rounds of patches for it, but\ncertainly still have more work to do on it.\n\nCompletion of arguments to git aliases or commands like fetch and\npush when --git-dir/--bare has been used is still a little buggy.\n\n-- \n"},{"id":"294880","messageId":"eikirg$772$1@sea.gmane.org","threadId":"43184","inReplyTo":"20061105113115.GC4843@spearce.org","subject":"Re: Bash completion Issue?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-11-05T11:45:14Z","receivedAt":"2006-11-05T11:45:14Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Shawn Pearce wrote:\n\n> Alan Chandler <alan@chandlerfamily.org.uk> wrote:\n>>  removing the git-completion package and copying the bash completion script \n>> from /usr/share/doc/git-core/contrib/completion to /etc/bash_completion.d \n>> solves the problem.  I am getting completion working fine now.\n> \n> Good.  :-)\n> \n> Let us know if there's anything you'd like to see in the bash\n> completion...  I just sent out two rounds of patches for it, but\n> certainly still have more work to do on it.\n\nI'd like to see completion for git-format-patch, git-cherry-pick\nand git-rebase. I tried to start doing completion for git-format-patch,\nbut realized that I don't know bash, and bash completion enough for that.\n\nWhile at it, do git-completion.bash takes into consideration that\nsome commands doesn't accept branch which is current branch.\n\nOtherwise, I find git-completion for bash very useful.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n\n"}]}