Skip to content

var ref is interpreted as history substitution #264

Closed
@andychu

Description

@andychu

Repro:

foo=bar
bar=baz
echo ${!foo}

bash prints baz, but OSH expands it to foo=bar.

Somehow bash has a special case for this? This does history substitution

echo ${x!foo}
-bash: !foo}: event not found

So the rule must be subtle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions