Re: Setting IFS='*' causes bash to freeze on tab completion

2016-07-02 Thread Chet Ramey
On 7/2/16 3:16 AM, Ibrahim M. Ghazal wrote:
> Thanks for the pointer. I reported it there (
> https://github.com/scop/bash-completion/issues/52 ).
> 
> After further investigation, the problem seems to be that when IFS is
> set to '*', case *) doesn't get executed. Is this the intended
> behavior?
> 
> For example:
> 
> IFS='*'; case "foo" in *) echo "got here";; esac
> 
> doesn't print "got here".

Yep, that's a bug.  Thanks for the report and reproducer.  The problem is
that the `*' ends up being matched literally instead of as a matching
character.  This will be fixed in the next release of bash.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Re: Setting IFS='*' causes bash to freeze on tab completion

2016-07-02 Thread Andreas Schwab
"Ibrahim M. Ghazal"  writes:

> After further investigation, the problem seems to be that when IFS is
> set to '*', case *) doesn't get executed. Is this the intended
> behavior?
>
> For example:
>
> IFS='*'; case "foo" in *) echo "got here";; esac
>
> doesn't print "got here".

The same issue exists for the other glob special characters ? [ ] .

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



Re: Setting IFS='*' causes bash to freeze on tab completion

2016-07-02 Thread Ibrahim M. Ghazal
Thanks for the pointer. I reported it there (
https://github.com/scop/bash-completion/issues/52 ).

After further investigation, the problem seems to be that when IFS is
set to '*', case *) doesn't get executed. Is this the intended
behavior?

For example:

IFS='*'; case "foo" in *) echo "got here";; esac

doesn't print "got here".