Re: saving bash.....(bash usefulness vs. being, orwellianly 'standardardized')

2011-08-12 Thread Linda Walsh
Eric Blake wrote: On 08/10/2011 10:39 PM, Linda Walsh wrote: It sounded to me like $(( )) would be translated into $( () ), turning off arithmetic expansion. Did I read that ___incorrectly__? Yes, you read it incorrectly. --- *thankyou* POSIX is saying that _if_ you want to

Re: Mailcheck during completion

2011-08-12 Thread Martin von Gagern
On 12.08.2011 01:05, Chet Ramey wrote: It's eval. Try the attached patch. Works like a charm. Thanks a lot! Martin signature.asc Description: OpenPGP digital signature

set -e yet again (Re: saving bash....)

2011-08-12 Thread Greg Wooledge
On Thu, Aug 11, 2011 at 11:56:10PM -0700, Linda Walsh wrote: **Exception** declare -i a a=0 -- As a is declared to be an integer, it has the results evaluated at assignment time. a=0 is an integer expression that doesn't set $?=1 Neither should: ((a=0)) a=0 is an assignment.

Re: set -e yet again (Re: saving bash....)

2011-08-12 Thread Linda Walsh
Greg Wooledge wrote: On Thu, Aug 11, 2011 at 11:56:10PM -0700, Linda Walsh wrote: **Exception** declare -i a a=0 -- As a is declared to be an integer, it has the results evaluated at assignment time. a=0 is an integer expression that doesn't set $?=1 Neither should: ((a=0)) a=0 is

Re: set -e yet again (Re: saving bash....)

2011-08-12 Thread Greg Wooledge
On Fri, Aug 12, 2011 at 08:18:42AM -0700, Linda Walsh wrote: If I write a==0 on the bash command line, it will generate an error. a=0 does not. 'Bash' knows the difference between an assignment and a equality test in math. imadev:~$ ((a==0)) imadev:~$ ((a=0)) imadev:~$ a==0 imadev:~$

Re: set -e yet again (Re: saving bash....)

2011-08-12 Thread Linda Walsh
Greg Wooledge wrote: On Fri, Aug 12, 2011 at 08:18:42AM -0700, Linda Walsh wrote: If I write a==0 on the bash command line, it will generate an error. a=0 does not. 'Bash' knows the difference between an assignment and a equality test in math. imadev:~$ ((a==0)) imadev:~$ ((a=0))

Re: set -e yet again (Re: saving bash....)

2011-08-12 Thread Greg Wooledge
On Fri, Aug 12, 2011 at 12:19:59PM -0700, Linda Walsh wrote: Under -e, it would fail on the 'let' statement This is one of the cases I mention on http://mywiki.wooledge.org/BashFAQ/105 -e -- in a WELL DESIGNED PROG***, where errors are caught, shouldn't cause a otherwise working program

Doc-bug Bash manpage:

2011-08-12 Thread Linda Walsh
In my bash package: rpm -qi bash Name : bash Relocations: (not relocatable) Version : 4.1 Vendor: openSUSE Release : 20.25.1 Build Date: Sun 27 Feb 2011 05:51:30 AM PST Install Date: Sun 22 May 2011 01:28:49 PM PDT Build Host: build31 ... in the 'bash' manpage, under the 'set' option,

Re: set -e yet again (Re: saving bash....)

2011-08-12 Thread Linda Walsh
Greg Wooledge wrote: On Fri, Aug 12, 2011 at 12:19:59PM -0700, Linda Walsh wrote: Under -e, it would fail on the 'let' statement This is one of the cases I mention on http://mywiki.wooledge.org/BashFAQ/105 AND there, you explain WHY this needs to be fixed. Your final