From: Andrew Sayers <andrew-git@pileofstuff.org>
To: solsTiCe d'Hiver <solstice.dhiver@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [bash-completion] syntax error near unexpected token '<' on line 123 in bash_completion.d/git
Date: Mon, 26 Jul 2010 22:39:58 +0100 [thread overview]
Message-ID: <4C4E00AE.7010904@pileofstuff.org> (raw)
In-Reply-To: <1280096368.7211.2.camel@soho.example.org>
On 25/07/10 23:19, solsTiCe d'Hiver wrote:
<snip>
> When I add the above command at line 98, it shows it is really bash
> running:
> 4.1.7(2)-release
> cmdhist:expand_aliases:extglob:extquote:force_fignore:interactive_comments:progcomp:promptvars:sourcepath
Hmm, that's interesting. It's certainly bash, but I don't see
"login_shell" in the list, which suggests that something is loading bash
completion stuff in a non-interactive shell that has no need for it.
That might increase your your boot time a bit, so you may want to take
it up with Arch Linux when we've got to the bottom of this.
One way I've found to replicate your behaviour is to call bash as sh:
$ ln -s /bin/bash sh
$ ./sh -c 'echo $BASH_VERSION'
4.1.5(1)-release
$ ./sh contrib/completion/git-completion.bash
contrib/completion/git-completion.bash: line 123: ...
Again, this fits with the theory that some non-interactive shell is
wrongly loading this stuff.
This time, could you tell me what the following debug messages print:
echo $BASHOPTS -- $SHELLOPTS -- $POSIXLY_CORRECT
tr '\0' ' ' < /proc/$$/cmdline ; echo
Could you also have a look at /bin/sh and any other files that might be
(incorrectly?) symlinked to bash?
On a wider point, I consider the bash/sh behaviour above to be a bug,
whether or not it's the cause of this specific problem. Unless someone
wants to tell me about git's long-standing policy against it, I'll try
and find some time to send in a patch warning usefully in this case.
- Andrew
next prev parent reply other threads:[~2010-07-26 21:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-25 11:12 [bash-completion] syntax error near unexpected token '<' on line 123 in bash_completion.d/git solsTiCe d'Hiver
2010-07-25 11:49 ` Ævar Arnfjörð Bjarmason
2010-07-25 20:01 ` Andrew Sayers
2010-07-25 22:19 ` solsTiCe d'Hiver
2010-07-26 21:39 ` Andrew Sayers [this message]
2010-07-27 9:24 ` solsTiCe d'Hiver
2010-07-27 10:43 ` solsTiCe d'Hiver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C4E00AE.7010904@pileofstuff.org \
--to=andrew-git@pileofstuff.org \
--cc=git@vger.kernel.org \
--cc=solstice.dhiver@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).