git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Patch for git-completion.bash  [SEC=UNCLASSIFIED]
@ 2010-08-16  0:53 David Scurrah
  2010-08-16  1:09 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 3+ messages in thread
From: David Scurrah @ 2010-08-16  0:53 UTC (permalink / raw)
  To: spearce@spearce.org; +Cc: git@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Completion-script-fails-because-of-syntax-error.patch --]
[-- Type: text/x-patch;  name="0001-Completion-script-fails-because-of-syntax-error.patch", Size: 985 bytes --]

From 593b92c22fb72884c4d61e6a4ae1dd65db89425f Mon Sep 17 00:00:00 2001
From: David Scurrah <dscurrah@bom.gov.au>
Date: Mon, 16 Aug 2010 10:35:28 +1000
Subject: [PATCH] Completion script fails because of syntax error

---
 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6756990..64b4f09 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -120,7 +120,7 @@ __git_ps1_show_upstream ()
 			upstream=svn+git # default upstream is SVN if available, else git
 			;;
 		esac
-	done < <(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')
+	done < $(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')
 
 	# parse configuration values
 	for option in ${GIT_PS1_SHOWUPSTREAM}; do
-- 
1.7.0.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Patch for git-completion.bash [SEC=UNCLASSIFIED]
  2010-08-16  0:53 Patch for git-completion.bash [SEC=UNCLASSIFIED] David Scurrah
@ 2010-08-16  1:09 ` Ævar Arnfjörð Bjarmason
       [not found]   ` <0E3686EB9FA8AA409AFA0A25468DCE4301309C3DE869@BOM-VMBX-HO.bom.gov.au>
  0 siblings, 1 reply; 3+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-16  1:09 UTC (permalink / raw)
  To: David Scurrah; +Cc: spearce@spearce.org, git@vger.kernel.org

On Mon, Aug 16, 2010 at 00:53, David Scurrah <D.Scurrah@bom.gov.au> wrote:

Thanks for not sending a classified patch.

Have you seen the "[bash-completion] syntax error near unexpected
token '<' on line 123 in bash_completion.d/git" thread recently on
this list? It probably describes the problem you're having.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch for git-completion.bash [SEC=UNCLASSIFIED]
       [not found]         ` <AANLkTi=QY+3M9jpuwXVcH1-yFhNQrjTfL9epTL-OYGMY@mail.gmail.com>
@ 2010-08-16  5:45           ` David Scurrah
  0 siblings, 0 replies; 3+ messages in thread
From: David Scurrah @ 2010-08-16  5:45 UTC (permalink / raw)
  To: avarab@gmail.com; +Cc: spearce@spearce.org, git@vger.kernel.org

Thanks reading the list showed running as sh instead of bash was my problem

I am trying to combine the very useful git-prompt
(http://volnitsky.com/project/git-prompt/) and git-completion.bash
scripts as each had something the other lacked.

The problem is that while git-prompt suggests you start it from .bashrc
via 
[[ $- == *i* ]]   &&   . /path/to/git-prompt.sh

Using . to execute git-completion.bash runs sh which runs bash in sh
emulation mode which makes it fail in several places.

I did see a thread about an attempt to make the script zsh compliant as
well, I wonder if it would be better to just make it sh compliant so
that it is more portable, I guess that's too hard

regards

David Scurrah
> >
> > On Mon, 2010-08-16 at 04:14 +0000, Ævar Arnfjörð Bjarmason wrote:
> >> On Mon, Aug 16, 2010 at 04:09, David Scurrah <D.Scurrah@bom.gov.au> wrote:
> >> > Hi,
> >> >
> >> > On Mon, 2010-08-16 at 01:09 +0000, Ævar Arnfjörð Bjarmason wrote:
> >> >> On Mon, Aug 16, 2010 at 00:53, David Scurrah <D.Scurrah@bom.gov.au> wrote:
> >> >>
> >> >> Thanks for not sending a classified patch.
> >> >
> >> > Ha ha - the Australian Government has to have email classifications for
> >> > every email sent - classified I believe just means I do not wish you to
> >> > share it not that it is a state secret (see one implementation
> >> > http://www.janus.net.au/janusSEAL/Outlook/features)
> >> >
> >> >
> >> >> Have you seen the "[bash-completion] syntax error near unexpected
> >> >> token '<' on line 123 in bash_completion.d/git" thread recently on
> >> >> this list? It probably describes the problem you're having.
> >> >
> >> > I'll looked hard and can't find the thread you mentioned
> >> > and the current version on my Fedora system does not complete first
> >> > level commands like checkout ...
> >>
> >> http://comments.gmane.org/gmane.comp.version-control.git/151723
> >>
> >> > Maybe there is something I am missing.
> >>
> >> You're probably executing the completion file in bash's sh compatibility mode.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-16  5:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-16  0:53 Patch for git-completion.bash [SEC=UNCLASSIFIED] David Scurrah
2010-08-16  1:09 ` Ævar Arnfjörð Bjarmason
     [not found]   ` <0E3686EB9FA8AA409AFA0A25468DCE4301309C3DE869@BOM-VMBX-HO.bom.gov.au>
     [not found]     ` <AANLkTi=cKVeDNqP018ottyB0xW3xp1yosO1AY6CQbnUY@mail.gmail.com>
     [not found]       ` <0E3686EB9FA8AA409AFA0A25468DCE4301309C3DE86A@BOM-VMBX-HO.bom.gov.au>
     [not found]         ` <AANLkTi=QY+3M9jpuwXVcH1-yFhNQrjTfL9epTL-OYGMY@mail.gmail.com>
2010-08-16  5:45           ` David Scurrah

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).