Re: How to protect > and interpret it later on? (w/o using eval)

2011-12-04 Thread Andreas Schwab
Peng Yu writes: > This capability will be useful for debugging bash script. See trap DEBUG and shopt extdebug. 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: *(.*) matches wrongly when dotglob unset

2011-12-04 Thread Yongzhi Pan
As e36freak said, @(.*) does not work also. I also find *(.*) doesn't match . and .. . $ diff <(ls -d *(.*)) <(ls -d .*) 0a1,2 > . > .. This may not be the expected result, or we need to clarify this in the manual. On Sat, Dec 3, 2011 at 5:11 AM, Chet Ramey wrote: > On 11/29/11 9:53 AM, Yongzh

Re: A programmable completoin bug?

2011-12-04 Thread Clark J. Wang
On Sat, Dec 3, 2011 at 09:32, Chet Ramey wrote: > On 11/30/11 2:08 AM, Clark J. Wang wrote: > > (Tested with bash 4.2.10 and 4.1.9) > > > > [bash-4.2.10] # cat foo.compspec > > compspec_foo() > > { > > local cmd=$1 cur=$2 pre=$3 > > > > if [[ $cur = :* ]]; then > > COMPREPLY=( cha

Re: A programmable completoin bug?

2011-12-04 Thread Chet Ramey
On 12/4/11 9:39 PM, Clark J. Wang wrote: > On Sat, Dec 3, 2011 at 09:32, Chet Ramey > wrote: > > On 11/30/11 2:08 AM, Clark J. Wang wrote: > > (Tested with bash 4.2.10 and 4.1.9) > > > > [bash-4.2.10] # cat foo.compspec > > compspec_foo() > > {

Re: A programmable completoin bug?

2011-12-04 Thread Clark J. Wang
On Mon, Dec 5, 2011 at 11:10, Chet Ramey wrote: > > I still can't reproduce it on Mac OS X or RHEL 5.7: > It's weird. :) Any other settings can affect this? What can I do to debug more? > > $ echo $BASH_VERSION > 4.2.20(8)-release > $ type -a compspec_foo > compspec_foo is a function > compspe

Re: A programmable completoin bug?

2011-12-04 Thread Chet Ramey
On 12/4/11 10:26 PM, Clark J. Wang wrote: > On Mon, Dec 5, 2011 at 11:10, Chet Ramey > wrote: > > > I still can't reproduce it on Mac OS X or RHEL 5.7: > > > It's weird. :) Any other settings can affect this? What can I do to debug > more? Well, if it were me,

Re: A programmable completoin bug?

2011-12-04 Thread Clark J. Wang
On Mon, Dec 5, 2011 at 11:42, Chet Ramey wrote: > On 12/4/11 10:26 PM, Clark J. Wang wrote: > > On Mon, Dec 5, 2011 at 11:10, Chet Ramey > > wrote: > > > > > > I still can't reproduce it on Mac OS X or RHEL 5.7: > > > > > > It's weird. :) Any other settings can af

Re: A programmable completoin bug?

2011-12-04 Thread Clark J. Wang
On Mon, Dec 5, 2011 at 13:15, Clark J. Wang wrote: > On Mon, Dec 5, 2011 at 11:42, Chet Ramey wrote: > >> On 12/4/11 10:26 PM, Clark J. Wang wrote: >> > On Mon, Dec 5, 2011 at 11:10, Chet Ramey > > > wrote: >> > >> > >> > I still can't reproduce it on Mac OS X or