Skip to content

Feature request: nix repl :pos command #10261

Open
@lolbinarycat

Description

Is your feature request related to a problem? Please describe.
nix provides several ways to get where something is defined, but they are somewhat obscure and have unintuitive interfaces.

Describe the solution you'd like
the :pos command would take an attribute path and try to find where it is defined, using builtins.unsafeGetAttrPos, meta.position, and whatever it is that gets used when printing a lambda.

Describe alternatives you've considered
a builtin function would be nice, but because builtins.unsafeGetAttrPos needs a string argument, this needs to be implemented using something that can take an unevaluated expression and decompose it like a macro. as far as i know only repl commands can do that.

Priorities

Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposalidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.replThe Read Eval Print Loop, "nix repl" command and debugger

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions