Skip to content

Composable CLI #251

@surprisetalk

Description

@surprisetalk

It would be cool if we could have a composable CLI that uses STDIN instead of filenames:

scrap eval < a.scrap
cat a.scrap | scrap eval
scrap eval <<< '1 + 2'
scrap eval <(echo "1 + 2")

I think this pattern shines when we include other commands:

cat users.scrap | scrap pipe "list/map (user -> user.name)"
cat a.scrap | scrap format > a.scrap
curl $SERVER/a | scrap flat parse | scrap type
cat a.scrap | scrap eval | scrap yard push

You can check out my draft PR here: #248

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions