Skip to content

Sometimes basic variable expansion is broken because of number pattern #306

@jeff-hykin

Description

@jeff-hykin

(using latest master branch)

rm -f $COMMON_CONFDIR/ifaces/$1

The $1 isn't parsed as a variable. Instead the $ is ignored and the 1 is parsed as a number

(program (command name: (command_name (word)) argument: (word) argument: (concatenation (simple_expansion (variable_name)) (word)) argument: (number)))

Alternatively:

<program>
    <command>
        <command_name>
            <word text="rm" />
        </command_name>
        <whitespace text=" " />
        <word text="-f" />
        <whitespace text=" " />
        <concatenation>
            <simple_expansion>
                <"$" text="$" />
                <variable_name text="COMMON_CONFDIR" />
            </simple_expansion>
            <word text="/ifaces/" />
            <"$" text="$" />
        </concatenation>
        <number text="1" />
    </command>
</program>

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