Fix cmdline argument check

There was a segfault when sent was called without arguments. Now we use stdin
when there's no argument or - is used. Thanks to izabera for the report.
This commit is contained in:
Markus Teich
2016-03-06 20:49:18 +01:00
parent 616aafdcb9
commit b954ed4b9f
2 changed files with 12 additions and 11 deletions

View File

@ -25,12 +25,12 @@ You can navigate with the arrow keys and quit with `q`.
Usage
sent FILE
sent [FILE]
If FILE equals `-`, stdin will be read. Produce image slides by prepending a
`@` in front of the filename as a single paragraph. Lines starting with `#` will
be ignored. A `\` at the beginning of the line escapes `@` and `#`. A
presentation file could look like this:
If FILE is omitted or equals `-`, stdin will be read. Produce image slides by
prepending a `@` in front of the filename as a single paragraph. Lines starting
with `#` will be ignored. A `\` at the beginning of the line escapes `@` and
`#`. A presentation file could look like this:
sent