Skip to content

Commit

Permalink
Add version to usage output
Browse files Browse the repository at this point in the history
  • Loading branch information
micha committed Feb 14, 2016
1 parent 0b7e928 commit 2d8cf12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ elb-2 i-b910a256

## Installation

`Jt` doesn't have any dependencies.
The current version is **1.0.0**. `Jt` doesn't have any dependencies.

```
make && sudo make install
Expand Down
5 changes: 3 additions & 2 deletions jt.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#define _GNU_SOURCE
#define JSMN_STRICT
#define JSMN_PARENT_LINKS
#define JT_VERSION "1.0.0"

#include <stdarg.h>
#include <stdio.h>
Expand Down Expand Up @@ -331,8 +332,8 @@ int run(char *js, int argc, char *argv[]) {
*****************************************************************************/

void usage(int status) {
fprintf(stderr, "Usage: jt [-h] [-F <char>] [-R <char>] [COMMAND ...]\n");
fprintf(stderr, "Transform JSON data into tab delimited lines of text.\n");
fprintf(stderr, "jt %s - transform JSON data into tab delimited lines of text.\n", JT_VERSION);
fprintf(stderr, "Usage: jt [-hjs] [-i <file>] [-o <file>] [-F <ch>] [-R <ch>] [COMMAND ...]\n");
fprintf(stderr, "COMMAND is one of `[', `]', `%%', `?', `^', or a property name.");
exit(status);
}
Expand Down

0 comments on commit 2d8cf12

Please sign in to comment.