Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89191 - problems with bash_complete
Summary: problems with bash_complete
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-15 08:32 UTC by Ian P. Christian
Modified: 2005-04-15 10:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian P. Christian 2005-04-15 08:32:40 UTC
If I put this in my .bashrc:

[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion

when I log in, I get the following.  

/bin/sh: _ImageMagick: line 99: ` -@(mask|profile|texture|tile|write))'
/bin/sh: error importing function definition for `_ImageMagick'
/bin/sh: _openssl: line 26: syntax error near unexpected token `('
/bin/sh: _openssl: line 26: ` -@(in|out|oid))'
/bin/sh: error importing function definition for `_openssl'
/bin/sh: _service: line 5: syntax error in conditional expression: unexpected token `('
/bin/sh: _service: line 5: syntax error near `@(*'
/bin/sh: _service: line 5: ` [[ ${COMP_WORDS[0]} != @(*init.d/!(functions|~)|service) ]] && return 0;'
/bin/sh: error importing function definition for `_service'
/bin/sh: _python: line 18: syntax error near unexpected token `('
/bin/sh: _python: line 18: ` !(python|-?))'
/bin/sh: error importing function definition for `_python'
/bin/sh: _aspell: line 6: syntax error near unexpected token `('
/bin/sh: _aspell: line 6: ` @(-c|-p|check))'
/bin/sh: error importing function definition for `_aspell'
/bin/sh: _java_classes: line 6: syntax error in conditional expression: unexpected token `('
/bin/sh: _java_classes: line 6: syntax error near `*.@(j'
/bin/sh: _java_classes: line 6: ` if [ -r $i ] && [[ "$i" == *.@(jar|zip) ]]; then'
/bin/sh: error importing function definition for `_java_classes'
/bin/sh: _gpg: line 6: syntax error near unexpected token `('
/bin/sh: _gpg: line 6: ` -@(s|-sign|-clearsign|-decrypt-files|-load-extension))'
/bin/sh: error importing function definition for `_gpg'
/bin/sh: _make: line 6: syntax error near unexpected token `('
/bin/sh: _make: line 6: ` -@(f|o|W))'
/bin/sh: error importing function definition for `_make'
/bin/sh: _cd: line 3: syntax error in conditional expression: unexpected token `('
/bin/sh: _cd: line 3: syntax error near `?(\'
/bin/sh: _cd: line 3: ` if [[ "$cur" == ?(\\)\$* ]]; then'
/bin/sh: error importing function definition for `_cd'
/bin/sh: _equery: line 13: syntax error near unexpected token `('
/bin/sh: _equery: line 13: ` @(belongs|ch@(anges|eck)|dep@(ends|graph)|files|glsa|list|s@(ize|tats)|uses|which|hasuse|b|c|k|d|g|f|a|h|l|s|t|u|w))'
/bin/sh: error importing function definition for `_equery'
/bin/sh: _rsync: line 7: syntax error near unexpected token `('
/bin/sh: _rsync: line 7: ` --@(config|password-file|include-from|exclude-from))'
/bin/sh: error importing function definition for `_rsync'
/bin/sh: _mkisofs: line 6: syntax error near unexpected token `('
/bin/sh: _mkisofs: line 6: ` -@(o|abstract|biblio|check-session|copyright|log-file|root-info|prep-boot|*-list))'
/bin/sh: error importing function definition for `_mkisofs'
/bin/sh: _tar: line 9: syntax error near unexpected token `('
/bin/sh: _tar: line 9: ` ?(-)c*f)'
/bin/sh: error importing function definition for `_tar'
/bin/sh: _gccconfig: line 18: syntax error near unexpected token `('
/bin/sh: _gccconfig: line 18: ` --@(print-environ|get-@(@(bin|lib)-path|stdcxx-incdir)))'
/bin/sh: error importing function definition for `_gccconfig'
/bin/sh: _javac: line 10: syntax error near unexpected token `('
/bin/sh: _javac: line 10: ` -@(classpath|bootclasspath|sourcepath|extdirs))'
/bin/sh: error importing function definition for `_javac'
/bin/sh: _complete: line 29: syntax error near unexpected token `('
/bin/sh: _complete: line 29: ` -@(p|r))'
/bin/sh: error importing function definition for `_complete'
/bin/sh: _longopt: line 14: syntax error in conditional expression: unexpected token `('
/bin/sh: _longopt: line 14: syntax error near `@(m'
/bin/sh: _longopt: line 14: ` if [[ "$1" == @(mk|rm)dir ]]; then'
/bin/sh: error importing function definition for `_longopt'
/bin/sh: _dropdb: line 6: syntax error near unexpected token `('
/bin/sh: _dropdb: line 6: ` -@(h|-host=))'
/bin/sh: error importing function definition for `_dropdb'
/bin/sh: _java_find_classpath: line 4: syntax error in conditional expression: unexpected token `('
/bin/sh: _java_find_classpath: line 4: syntax error near `-@(c'
/bin/sh: _java_find_classpath: line 4: ` if [[ "${COMP_WORDS[i]}" == -@(cp|classpath) ]]; then'
/bin/sh: error importing function definition for `_java_find_classpath'
/bin/sh: _cdrecord: line 9: syntax error near unexpected token `('
/bin/sh: _cdrecord: line 9: ` @(text|cue)file)'
/bin/sh: error importing function definition for `_cdrecord'
/bin/sh: _function: line 5: syntax error in conditional expression: unexpected token `('
/bin/sh: _function: line 5: syntax error near `@(d'
/bin/sh: _function: line 5: ` if [[ $1 == @(declare|typeset) ]]; then'
/bin/sh: error importing function definition for `_function'
/bin/sh: _command: line 43: syntax error in conditional expression: unexpected token `('
/bin/sh: _command: line 43: syntax error near `@(d'
/bin/sh: _command: line 43: ` if [[ "$cspec" != @(dir|file)names ]]; then'
/bin/sh: error importing function definition for `_command'
/bin/sh: _java: line 21: syntax error near unexpected token `('
/bin/sh: _java: line 21: ` -@(cp|classpath))'
/bin/sh: error importing function definition for `_java'
/bin/sh: _createdb: line 6: syntax error near unexpected token `('
/bin/sh: _createdb: line 6: ` -@(h|-host=))'
/bin/sh: error importing function definition for `_createdb'
/bin/sh: _javaconfig: line 21: syntax error near unexpected token `('
/bin/sh: _javaconfig: line 21: ` --j@(a@(r|va@(c|-version))|@(dk|re)-home))'
/bin/sh: error importing function definition for `_javaconfig'
/bin/sh: _find: line 6: syntax error near unexpected token `('
/bin/sh: _find: line 6: ` -@(max|min)depth)'
/bin/sh: error importing function definition for `_find'
/bin/sh: _chown: line 14: syntax error in conditional expression: unexpected token `('
/bin/sh: _chown: line 14: syntax error near `*@(\'
/bin/sh: _chown: line 14: ` if [[ $cur = *@(\\:|.)* ]] && [ -n "$bash205" ]; then'
/bin/sh: error importing function definition for `_chown'
/bin/sh: _psql: line 18: syntax error near unexpected token `('
/bin/sh: _psql: line 18: ` -@(o|f) | --output | --file)'
/bin/sh: error importing function definition for `_psql'
/bin/sh: _emerge: line 113: syntax error in conditional expression: unexpected token `('
/bin/sh: _emerge: line 113: syntax error near `@(''
/bin/sh: _emerge: line 113: ` if [[ "${cur} " == @('/'|'.'|'~'|'$')* ]]; then'
/bin/sh: error importing function definition for `_emerge'
/bin/sh: _iconv: line 10: syntax error in conditional expression: unexpected token `('
/bin/sh: _iconv: line 10: syntax error near `-@(f'
/bin/sh: _iconv: line 10: ` if [[ "$prev" == -@(f|t|-@(from|to)-code) ]]; then'
/bin/sh: error importing function definition for `_iconv'
/bin/sh: _javadoc: line 6: syntax error near unexpected token `('
/bin/sh: _javadoc: line 6: ` -@(overview|helpfile|stylesheetfile))'
/bin/sh: error importing function definition for `_javadoc'
Comment 1 Ciaran McCreesh 2005-04-15 10:01:46 UTC
'emerge info' output? bash version? bash-completion version?
Comment 2 Ian P. Christian 2005-04-15 10:07:11 UTC
sorry :)

# emerge info
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r5 i686)
=================================================================
System uname: 2.6.11-gentoo-r5 i686 AMD Athlon(tm) XP 2400+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 17 2005, 14:57:25)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.9.4, 1.6.3, 1.7.9-r1, 1.4_p6, 1.8.5-r3
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/ http://ftp.easynet.nl/mirror/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dfx 3dnow X aalib acpi alsa apache2 apm arts artswrappersuid avi bash-completion bcmath berkdb bitmap-fonts cdparanoia cdr crypt cups curl dba docs dvd dvdr emboss encode esd exiscan-acl fam flac flash font-server foomaticdb fortran gd gdbm gif gpm gtk2 iconv imagemagick imap imlib inifile innodb ipv6 jabber java jpeg junit justify kde ldap libg++ libwww mad mailbox maildir mikmod mmx motif mozilla moznoxft mp3 mpeg msessoin mysql ncurses nls nntp nptl nvidia ogg oggvorbis opengl oss pam pcmcia pda pdflib perl php png pnp posix postgres python qt quicktime readline samba sdl session simplexml snmp spell sqlite ssl svga tcpd tiff transcode truetype truetype-fonts type1-fonts usb vorbis xine xinerama xml xml2 xmms xosd xsl xv zlib linguas_en_GB"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY

# qpkg -v -I bash
app-shells/bash-completion-config-0.8-r1 *
app-shells/bash-2.05b-r9 *
app-shells/bash-completion-20050121-r1 *

# bash-completion-config -l
bash-completion-config-0.8

           | Local  Global |
----------------------------
gentoo     |          *    |
----------------------------
Comment 3 Aaron Walker (RETIRED) gentoo-dev 2005-04-15 10:30:50 UTC
Somehow you're sourcing that from a bash --posix session.  Can't do that and expect bash extglobs and [[ ]] tests to work.