Skip to content

Wrong output when using -v and -h flags #5

Closed
@mischah

Description

@mischah

It shows:

✖ Invalid input. Please check the help below:

  Sends native desktop notifications if CLI apps fail

  Usage
    $ onerror <command> [options]

  Options
    --title,   -t   Sets the title of the notification.
                    Default: "An error has occured"
    --message, -m   Sets the message body of the notification.
                    Default: "Check the terminal for more information"
    --icon,    -i   Sets an icon. Can be any absolute path.
    --sound,   -s   Defines which sound to use.
                    Use "mute" to disable default sound notification.
                    Options: Mute, Basso, Blow, Bottle, Frog, Funk, Glass, Hero,
                             Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink
                    Default: Bottle
    --version  -v   Displays the version number.
    --help     -h   Displays the help.

  Examples
    $ onerror "wget unknown-host.xyz"
    $ onerror "wget unknown-host.xyz" -s mute
    $ onerror "wget unknown-host.xyz" -t Error -m "My error message"
    $ onerror "wget unknown-host.xyz"  -s Glass -i https://cdn.rawgit.com/npm/logos/31945b5c/npm%20square/n-64.png

--version and --help are working as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions