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

Re: [bash-completion] syntax error near unexpected token '<' on line 123 in bash_completion.d/git

From
solsTiCe d'Hiver <solstice.dhiver@gmail.com>
Date
Jul 27, 2010, 09:24 UTC
Message-ID
<1280222655.9955.32.camel@soho.example.org>
In-Reply-To
<4C4E00AE.7010904@pileofstuff.org>
Le lundi 26 juillet 2010 à 22:39 +0100, Andrew Sayers a écrit : 
Show 5 quoted lines
> This time, could you tell me what the following debug messages print:
> 
> echo $BASHOPTS -- $SHELLOPTS -- $POSIXLY_CORRECT
> tr '\0' ' ' < /proc/$$/cmdline ; echo
> 

cmdhist:expand_aliases:extglob:extquote:force_fignore:interactive_comments:progcomp:promptvars:sourcepath -- braceexpand:hashshell:interactive-comments:posix -- y /bin/sh /usr/sbin/gdm

> Could you also have a look at /bin/sh and any other files that might be
> (incorrectly?) symlinked to bash?
> 

I have included gdm in the DAEMON list in my /etc/rc.conf. I tried to run it from inittab in a more usual way and get the same ?!

When I looked at /usr/sbin/gdm, I found the cause of this problem, look at that

#!/bin/sh # # A script so that # 1) we read the standard system env vars # 2) syadmins/integrators can add their own private options etc...

test -f /etc/profile && . /etc/profile
# Make sure LANG is set
#
if [ -z "$LANG" ]
then
  if [ -f /etc/sysconfig/language ]
  then
    LANG=`. /etc/sysconfig/language; echo $RC_LANG`
    export LANG
  fi
fi
exec /usr/sbin/gdm-binary "$@"
Note: it's not a custom archlinux script. This is straight from gdm
release 2.30.4

so it's a non-login shell (sh) script that source /etc/profile and breaks standard behavior. no wonder that bash_completion stuff is run there

Previous: Andrew SayersNext: solsTiCe d'Hiver
Message 6 of 7 in “[bash-completion] syntax error near unexpected token '<' on line 123 in bash_completion.d/git”
  1. solsTiCe d'HiverJul 25, 2010
  2. Ævar Arnfjörð BjarmasonJul 25, 2010
  3. Andrew SayersJul 25, 2010
  4. solsTiCe d'HiverJul 25, 2010
  5. Andrew SayersJul 26, 2010
  6. solsTiCe d'HiverJul 27, 2010
  7. solsTiCe d'HiverJul 27, 2010

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.