Skip to content

Revisit simple parameter expansion #16

@pombredanne

Description

@pombredanne

The simple parameters such as $foo or ${bar} are expanded by simple replacement which may not be entirely correct

In expand_simple() we need to validate if a plain replace is really what is supposed to happen in particular simple expansion may need to happen on tokens rather than on the whole string.

For instance, with foo=bar, abc$fooBAR does not expand in Bash

Also foo=BUZ;foobar=BAZ;echo "$foobar" which means the longest parameter name is matched first and we do not apply this correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions