Re: read builtin and readonly variables

2011-01-04 Thread Eric Blake
On 01/03/2011 11:41 PM, Jan Schampera wrote: > Hello list, > > > the read builtin command, when trying to assign to a readonly variable > after reading the data, spits an error message. This is fine. > > But the return status is 0. It "always" (down to 2.04 was tested) has > been like that, and

Re: read builtin and readonly variables

2011-01-04 Thread Chet Ramey
On 1/4/11 10:05 AM, Eric Blake wrote: > On 01/03/2011 11:41 PM, Jan Schampera wrote: >> Hello list, >> >> >> the read builtin command, when trying to assign to a readonly variable >> after reading the data, spits an error message. This is fine. >> >> But the return status is 0. It "always" (down to

Re: read builtin and readonly variables

2011-01-04 Thread Eric Blake
[adding David Korn for a ksh bug] On 01/04/2011 08:25 AM, Chet Ramey wrote: >> getopts also suffers from a difference in behavior between shells on >> readonly arguments: >> >> $ ksh -c 'readonly foo; getopts a: foo -a blah; echo $?' >> ksh[1]: ksh: foo: is read only >> $ echo $? >> 2 >> $ bash -c

need help about add new features

2011-01-04 Thread Yunfan Jiang
hi, i am trying to add a feature for bash's builtin cmd "cd" , and i met some problems 1, currently i just find the opt parsing block, and i got know how to add a new option, but i think if i want to public this, its not all things, some others things like useage need to be change and auto-fix ,b

The translated command synopsises are never used

2011-01-04 Thread goeran
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale'

Re: Bug in shell: buffer overflow.

2011-01-04 Thread nz
I read the manual hastily. Sorry for message and thank you for perfect answer.

Re: read builtin and readonly variables

2011-01-04 Thread Chet Ramey
On 1/4/11 10:35 AM, Eric Blake wrote: >> The shell should not exit on an assignment error with getopts, since >> getopts is not a special builtin. > > Good point - 'unset' is different than 'getopts' or 'read' when it comes > to special builtin status, and I agree that only special builtins are >