Skip to content

${!foo*} again #875

@phidebian

Description

@phidebian

I open this as a bug, but it may be a pilot error, if so do close it as 'not a bug'.

I see this commit 4a8072e

So I am inclined to think I may misunderstand something, yet I got this and dunno if this is expected.

$ a=1
$ a.a=2
$ a.b=3
$ a.c=4
$ a.aa=5
$ a.ac=6

$ echo "${!a.a*}"
a.a a.a a.aa a.ac

This a.a a.a is confusing, I was more expecting a.a a.aa a.ac

The commit says

    This bugfix is backported from the abandoned ksh 93v- beta, so AT&T
    intended this change. It also makes ksh work like bash in this.

Yet doing a bash approximation I got

$ a=1
$ a_a=2
$ a_b=3
$ a_c=4
$ a_aa=5
$ a_ac=6
$ echo "${!a_a*}"
a_a a_aa a_ac

I can not compile a commit that old, so I can't revert back to prior this commit...

If this is expected, then we may close this and I will fix my scripts to skip over the repetition...

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions