globstar syntax

2009-01-20 Thread Alex Reed
Should the globstar (**) syntax allow for partial parameter matching (i.e. **.c to find all *.c files in the current directory and its sub- directories)? Currently this can be implemented like this: for i in **; do if [[ ${i} =~ \.c$ ]]; then ; fi; done It would be pleasantly convenient if this w

Re: globstar syntax

2009-01-20 Thread Chet Ramey
> Should the globstar (**) syntax allow for partial parameter matching > (i.e. **.c to find all *.c files in the current directory and its sub- > directories)? No. The globstar syntax only allows recursive directory traversal. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: Bash 4: command_not_found_handle event handler

2009-01-20 Thread Jan Schampera
Jan Schampera wrote: > Hello list! > > Just a few thoughts, awaiting comments. Heh. I wanted to raise a discussion about that issue, but it seems I failed (or I'm the only one who cares) ;) Jan

Re: simple bug/compat question

2009-01-20 Thread Chet Ramey
Linda Walsh wrote: > Am running an older bash version and this may be fixed (assuming it > is a bug and I'm not confused...:-)) > > bash version = 3.2.39(20) > > This works: > 1)if [ -n "" -a 2 -gt 1 ] ; then echo one;fi > > This does not: > 2)if [[ -n "" -a 2 -gt 1 ]] ; then echo on

Re: dabbrev-expand behavior

2009-01-20 Thread Bob Proulx
Dan Nicolaescu wrote: > Chet Ramey writes: > > Dan Nicolaescu wrote: > > > Unfortunately the behavior is not consistent with what dabbrev-expand > > > does in Emacs (and tcsh), so it will be quite confusing for users to > > > use. > > ... > > It might not be exactly the way emacs and tc

Re: globstar syntax

2009-01-20 Thread Sebastian Kapfer
Am Montag, den 19.01.2009, 10:14 -0800 schrieb Alex Reed: > Should the globstar (**) syntax allow for partial parameter matching > (i.e. **.c to find all *.c files in the current directory and its sub- > directories)? > > Currently this can be implemented like this: > for i in **; do if [[ ${i} =~

Re: globstar syntax

2009-01-20 Thread Chet Ramey
> > Should the globstar (**) syntax allow for partial parameter matching > > (i.e. **.c to find all *.c files in the current directory and its sub- > > directories)? > > No. > > The globstar syntax only allows recursive directory traversal. However, let me add that you can achieve what you want

Re: globstar syntax

2009-01-20 Thread Chet Ramey
Sebastian Kapfer wrote: > Am Montag, den 19.01.2009, 10:14 -0800 schrieb Alex Reed: >> Should the globstar (**) syntax allow for partial parameter matching >> (i.e. **.c to find all *.c files in the current directory and its sub- >> directories)? >> >> Currently this can be implemented like this: >