Skip to content

Commit

Permalink
Handle unexpected command
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmc3 committed Dec 29, 2023
1 parent 219afde commit 12bb2ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/antibody
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ antibody() {
;;
*)
echoerr "antibody: error: expected command but got \"$cmd\", try --help"
return 1
;;
esac
}
Expand Down
10 changes: 10 additions & 0 deletions bin/antibody.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,15 @@ TODO:

TODO:

### Misc

Some misc testing

```sh
$ antibody foo #=> --exit 1
antibody: error: expected command but got "foo", try --help
$
```

[antibody]: https://github.com/getantibody/antibody
[clitest]: https://github.com/aureliojargas/clitest

0 comments on commit 12bb2ce

Please sign in to comment.