Skip to content

[feature req] Accept more inputs? #129

Open
@ComedyTomedy

Description

It would be good to accept more input without crashing, and make it slightly simpler to script with wob. I'd suggest:

  • integers continue as normal
  • allow the string "%" at the end of the number, so 0%-100%.
  • accept empty input as if it were 0, so echo | wob would work, (and commands with empty output, too)
  • perhaps accept any other non-empty string as if it were "100". Along with empty-input being zero, this would allow grep | wob without needing sed etc.

The downside of adding these behaviours is that it would be difficult or impossible to add other valid input types in the future, at least without ambiguity. Although I don't think that would be very useful, unless you wanted to accept config changes or commands.

Separate/related thought - Exiting on invalid input isn't particularly helpful anyway, I think I'd prefer that it responds as best it can and keeps running.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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