Re: Failglob issues

2013-09-01 Thread Chet Ramey
On 9/1/13 5:45 AM, Nikolai Kondrashov wrote: > Hi everyone, > > I'm trying to use "failglob" option in several projects of mine and noticed > the following strange behavior. > > 1) With both nullglob and failglob enabled it is considered an error for a >glob not to match anything. I'd say it'

Re: Failglob issues

2013-09-01 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/1/13 10:52 AM, Chris Down wrote: > This seems a bit more odd to me. > > $ > foo > $ declare -A foo=([bar]=*) > $ echo "${foo[bar]}" > * > $ shopt -s nullglob > $ declare -A foo=([bar]=*) > $ echo "${foo[bar]}" > >

Re: Failglob issues

2013-09-01 Thread Nikolai Kondrashov
On 09/01/2013 05:52 PM, Chris Down wrote: On 2013-09-01 12:45, Nikolai Kondrashov wrote: 1) With both nullglob and failglob enabled it is considered an error for a glob not to match anything. I'd say it's more natural to not produce an error in this case. Otherwise a fairly useful behavi

Re: Failglob issues

2013-09-01 Thread Chris Down
On 2013-09-01 12:45, Nikolai Kondrashov wrote: > 1) With both nullglob and failglob enabled it is considered an error for a >glob not to match anything. I'd say it's more natural to not produce an >error in this case. Otherwise a fairly useful behavior is broken, like >glob use in "for"