Skip to content

Copying a function doesn't set the line number #6575

@faho

Description

@faho

Define func.fish with the following contents:

function t1
    echo t1
end

functions -c t1 t2

functions t1
functions t2

and run it as fish func.fish.

This prints:

# Defined in func.fish @ line 1
function t1
    echo t1
end
function t2
    echo t1
end

Notice how t2 does not print a line number? I feel it should, specifically line 5.

I noticed this while porting the "function.in" test to littlecheck, because that runs the tests as a file instead of via stdin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions