Skip to content

Partial evaluation like xargs #14

Closed

Description

@wycats

Straw man:

ps | where name =~ chrome | kill $it.pid

TL;DR, when a statement refers to $it, it effectively desugars into a closure taking one parameter whose value is the current pipeline input.

Activity

  1. sophiajt commented on Aug 3, 2019

    @sophiajt
    Contributor

    Likely blocked on #180

  2. wycats commented on Aug 26, 2019

    @wycats
    ContributorAuthor

    This is done

  3. raboof commented on Oct 1, 2021

    @raboof
    Contributor

    How do you use this? I get unknown variable: $it with the straw man example, but I guess the actual syntax is different ;)

  4. raboof commented on Oct 1, 2021

    @raboof
    Contributor

    Ah, ps | where name =~ chrome | each { kill $it.pid }

  5. added a commit that references this issue on Feb 7, 2022
  6. hasnolen commented on Jul 10, 2022

    @hasnolen

    Seems like I had use $in, not $it. See

    Pass values as command parameters

    ls \*\*/Makefile | get name | vim $in

  7. added a commit that references this issue on Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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