Skip to content

Custom functions #38

@RustemB

Description

@RustemB

How about custom functions support (or plugins)
Like:

seq 5 | filter is_odd

will return:

1
3
5

where is_odd is custom function (e.g. in ~/.config/shell-functools/plugins/main.py directory)

@functools.func("Int", "Bool") #or @functools.func(int, bool)
def is_odd(a: int) -> bool:
    return a % 2 == 1

but, yes, it looks very complicated...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions