summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Frank Denis <124872+jedisct1@users.noreply.github.com>2019-05-10 18:42:26 +0200
committerGravatar GitHub <noreply@github.com>2019-05-10 18:42:26 +0200
commit95b4c87139ae2167d589b7ba24587477b9476258 (patch)
tree0b7f285016a3909c68f48cebaeb6a440f9be9407
parentbd967df818c1d385d72c959ab2c3e24ddf5d0709 (diff)
parentf8236c5d1559b85e481472ade252cf847b77d73f (diff)
downloadtweetpipe-95b4c87139ae2167d589b7ba24587477b9476258.tar.gz
Merge pull request #4 from giucal/minutiae
Minor CLI modifications
-rw-r--r--src/encpipe.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/encpipe.c b/src/encpipe.c
index e0f206d..735ed87 100644
--- a/src/encpipe.c
+++ b/src/encpipe.c
@@ -11,13 +11,20 @@ static void
usage(void)
{
puts(
- "Usage:\n\n"
- "Encrypt: encpipe -e -p <password> [-i <inputfile>] [-o <outputfile>]\n"
- " encpipe -e -P <password file> [-i <inputfile>] [-o <outputfile>]\n\n"
- "Decrypt: encpipe -d -p <password> [-i <inputfile>] [-o <outputfile>]\n"
- " encpipe -d -P <password file> [-i <inputfile>] [-o <outputfile>]\n\n"
- "Passgen: encpipe -G\n");
- exit(0);
+ "Usage:\n"
+ " encpipe -G\n"
+ " encpipe {-e | -d} {-p <string> | -P <file>} [-i <file>] [-o <file>]\n"
+ "\n"
+ "Options:\n"
+ " -G, --passgen generate a random password\n"
+ " -e, --encrypt encryption mode\n"
+ " -d, --decrypt decryption mode\n"
+ " -p, --pass <password> use <password>\n"
+ " -P, --passfile <file> read password from <file>\n"
+ " -i, --in <file> read input from <file>\n"
+ " -o, --out <file> write output to <file>\n"
+ " -h, --help print this message");
+ exit(2);
}
static int