add generated files to .gitignore

2018-02-23 Thread don fong
based on my experience creating one patch, running "make" and "make
test", i found that "git status" was reporting a lot of generated and
built files that i think should be ignored.

i added the "untracked" files to .gitignore, and this is the patch.


ign.patch
Description: Binary data


Re: misleading error message from variable modifier

2018-02-23 Thread don fong
Clark, thanks for your response.  i'm attaching my patch.


On Fri, Feb 23, 2018 at 7:32 PM, Clark Wang  wrote:
> On Sat, Feb 24, 2018 at 11:20 AM, don fong  wrote:
>>
>>
>> i would like to submit this change for inclusion in bash.  how should i
>> proceed?
>
>
> It's very common to send patches directly to this mailing list. I believe
> it's also OK to send only to Chet. :)


myfix.patch
Description: Binary data


Re: misleading error message from variable modifier

2018-02-23 Thread Clark Wang
On Sat, Feb 24, 2018 at 11:20 AM, don fong  wrote:

>
> i would like to submit this change for inclusion in bash.  how should i
> proceed?
>

It's very common to send patches directly to this mailing list. I believe
it's also OK to send only to Chet. :)


misleading error message from variable modifier

2018-02-23 Thread don fong
hi folks.  i'm a bash user, who just noticed a slight anomaly.  it has
to with the shell variable modifier ${parameter?} .  according to the
man page, ${X?} should yield an error message and exit if X is unset,
otherwise the value of X.  in this case,

unset X; echo ${X?}

i expect to get an error message, and indeed an error message results.

bash: X: parameter null or not set

but i think the error message is misleading.  the wording sort of
implies that null would be an error, even though with the ? modifier,
null is OK.  it's kind of confusing as well, to see the same error
message from both ${X?} and ${X:?} when they are really checking
distinct things.

i think the error message should say

bash: X: parameter is not set

a co-worker challenged me to submit a patch.  so i downloaded the
code, looked at it, made a fix, and created a test script compatible
with the existing tests/ framework.  all tests pass.  (i glanced
around in the tests/ directory, did not see any tests of the variable
modifiers, so i extended my tests to cover some of the other modifiers
as well.)

i would like to submit this change for inclusion in bash.  how should i proceed?