Skip to content

Commit

Permalink
ttyplot.c|README.md: Separate -h and -v from the rest in usage
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork committed Nov 26, 2023
1 parent 01211e7 commit c48c4d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ ttyplot also supports *counter* style metrics, calculating *rate* by measured ti
## flags

```
ttyplot [-h] [-v] [-2] [-r] [-c plotchar] [-s scale] [-m max] [-M min] [-t title] [-u unit]
ttyplot [-2] [-r] [-c plotchar] [-s scale] [-m max] [-M min] [-t title] [-u unit]
ttyplot -h
ttyplot -v
-2 read two values and draw two plots, the second one is in reverse video
-r rate of a counter (divide value by measured sample interval)
Expand Down
6 changes: 5 additions & 1 deletion ttyplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ int width=0, height=0, n=-1, r=0, v=0, c=0, rate=0, two=0, plotwidth=0, plotheig
const char *verstring = "https://github.com/tenox7/ttyplot " VERSION_STR;

void usage(void) {
printf("Usage:\n ttyplot [-h] [-v] [-2] [-r] [-c plotchar] [-s scale] [-m max] [-M min] [-t title] [-u unit]\n\n"
printf("Usage:\n"
" ttyplot [-2] [-r] [-c plotchar] [-s scale] [-m max] [-M min] [-t title] [-u unit]\n"
" ttyplot -h\n"
" ttyplot -v\n"
"\n"
" -2 read two values and draw two plots, the second one is in reverse video\n"
" -r rate of a counter (divide value by measured sample interval)\n"
" -c character to use for plot line, eg @ # %% . etc\n"
Expand Down

0 comments on commit c48c4d2

Please sign in to comment.