[BUG][bash][auto completion] if COMPREPLY contents ":" auto completion doesn't work properly

2006-09-23 Thread Vasily Tarasov
Hello all,

I suppose I've found a bug;
My bash version:
GNU bash, version 3.00.15(1)-release (i686-redhat-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
But I also have downloaded bash 3.1 and this bug is reproducible there to.

Actions to reproduce:
1) Create the file test.sh, that contents:

_myfunc()
{
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $( compgen -W "qwe:on qwe:off" -- $cur) )
}

complete -F _myfunc myfunc

2) Apply this file to the following bash environment:
. ./test.sh

3) Let's try it:
[EMAIL PROTECTED] $ myfunc
Press tab once:
[EMAIL PROTECTED] $ myfunc qwe:o
Press tab secondary:
[EMAIL PROTECTED] $ myfunc qwe:qwe:o


Note, that if ':" is replaced by something else, for exampe '!'
everything works:
[EMAIL PROTECTED] $ myfunc qwe!o
qwe!off  qwe!on
[EMAIL PROTECTED] $ myfunc qwe!off

Please, tell me is it a BUG? If it is  - will it be fixed, where I can
follow the progress (I've found no bugzilla for bash)?
If it isn't a bug, please, advice me a workaround.

Thanks for your work,
Vasily Tarasov.













___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


[Patch] Fix QNX biuld error

2006-09-23 Thread Ben Gardner

There is an error on line 29 of variables.c in bash-3.1.
It should read:
#include 
not
#include 

Attached is a patch that fixes this, although it would be easier to
fix it manually.

Ben
--- bash-3.1/variables.c2005-11-12 20:22:37.0 -0600
+++ bash-3.1.orig/variables.c   2006-09-18 10:07:21.0 -0500
@@ -26,7 +26,7 @@
 
 #if defined (qnx)
 #  if defined (qnx6)
-#include 
+#include 
 #  else
 #include 
 #  endif /* !qnx6 */
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: [BUG][bash][auto completion] if COMPREPLY contents ":" auto completion doesn't work properly

2006-09-23 Thread Paul Jarc
Vasily Tarasov <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] $ myfunc
> Press tab once:
> [EMAIL PROTECTED] $ myfunc qwe:o
> Press tab secondary:
> [EMAIL PROTECTED] $ myfunc qwe:qwe:o

You can work around this by removing : from $COMP_WORDBREAKS.  Ii
looks like a bug, since the : inserted by completion should probably
be backslah-escaped, but I don't know whether it would be bash or your
completion function that's responsible for adding the backslash.


paul


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash