From fb6c722838a3b75e01651515d5a6574365377457 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 17 Feb 2017 00:46:26 +0000 Subject: [PATCH] allow -j as an alias for -threads 1) it's shorter 2) it's what make and GNU parallel use beware that we still need the = character, since we're not using getopt(). --- jobflow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jobflow.c b/jobflow.c index 618cf95..d565930 100644 --- a/jobflow.c +++ b/jobflow.c @@ -323,7 +323,7 @@ static int syntax(void) { "\n" "-skip=XXX\n" " XXX=number of entries to skip\n" - "-threads=XXX\n" + "-threads=XXX (alternative: -j=XXX)\n" " XXX=number of parallel processes to spawn\n" "-resume\n" " resume from last jobnumber stored in statefile\n" @@ -385,6 +385,7 @@ static int parse_args(int argc, char** argv) { return syntax(); op_temp = op_get(op, SPL("threads")); + if(!op_temp) op_temp = op_get(op, SPL("j")); long long x = op_temp ? strtoll(op_temp,0,10) : 1; if(x <= 0) die("threadcount must be >= 1\n"); prog_state.numthreads = x; -- 2.11.4.GIT