Commit 6f087127c64ccc5c39b97a8e05f4f72735a6a505
1 parent
85236bb762
Add `Antigen:` prefix to error messages.
When in a script, it can be very hard to tell where an error is coming from, just from the message. Adding this prefix should help a bit, by providing some context to the error.
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
antigen.zsh
| ... | ... | @@ -546,7 +546,7 @@ EOF |
| 546 | 546 | antigen () { |
| 547 | 547 | local cmd="$1" |
| 548 | 548 | if [[ -z "$cmd" ]]; then |
| 549 | - echo 'Please give a command to run.' >&2 | |
| 549 | + echo 'Antigen: Please give a command to run.' >&2 | |
| 550 | 550 | return 1 |
| 551 | 551 | fi |
| 552 | 552 | shift |
| ... | ... | @@ -554,7 +554,7 @@ antigen () { |
| 554 | 554 | if functions "antigen-$cmd" > /dev/null; then |
| 555 | 555 | "antigen-$cmd" "$@" |
| 556 | 556 | else |
| 557 | - echo "Unknown command: $cmd" | |
| 557 | + echo "Antigen: Unknown command: $cmd" >&2 | |
| 558 | 558 | fi |
| 559 | 559 | } |
| 560 | 560 |