Skip to content

fish cannot detect would-be-valid variable #6654

@mqudsi

Description

@mqudsi
set tables one two three
for table in $tables
    echo foo > $table.sql
end

as $table is not a live variable at the time the loop is being composed, the redirect destination is highlighted in the error color.

This behavior is just a particular illustration of the underlying problem. I'm pretty sure the editor and the parser simply were not designed with any of this in mind, so any fixes would have to either be architectural or hacks. Or I could be wrong and this could be a cinch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions