Please sign in to comment.
completion: split __git_ps1 into a separate script
bash-completion 1.90 shipped with support to load completions dynamically, which means the git completion script wouldn't be loaded until the user types 'git <tab>'--this creates a problem to people using __git_ps1(); that function won't be available when the shell is first created. For now distributions have workarounded this issue by moving the git completion to the "compatdir"; this of course is not ideal. The solution, proposed by Kerrick Staley, is to split the git script in two; the part that deals with __git_ps1() in one (i.e. git-prompt.sh), and everything else in another (i.e. git-completion.bash). Another benefit of this is that zsh user that are not interested in the bash completion can use it for their prompts, which has been tried before. The only slight issue is that __gitdir() would be duplicated, but this is probably not a big deal. So let's go ahead and move __git_ps1() to a new file. While at this, I took the liberty to reformat the help text in the new file.  http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=99c4f7f25f50a7cb2fce86055bddfe389effa559  http://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/git&id=974380fabb8f9f412990b17063bf578d98c44a82  http://mid.gmane.org/CANaWP3w9KDu57aHquRRYt8td_haSWTBKs7zUHy-xu0B61gmr9A@mail.gmail.com  http://firstname.lastname@example.org Cc: Kerrick Staley <email@example.com> Cc: Marius Storm-Olsen <firstname.lastname@example.org> Cc: Ville Skyttä <email@example.com> Cc: Dan McGee <firstname.lastname@example.org> Signed-off-by: Felipe Contreras <email@example.com> Signed-off-by: Junio C Hamano <firstname.lastname@example.org>
- Loading branch information...
Showing with 290 additions and 256 deletions.
Oops, something went wrong.