use explicit options instead of positional arguments
Use mandatory commandline options instead of positional arguments. Those more clearly state the purpose each argument. Critical parameters like secret or verification keys should be explicitely designated so they cannot be confused with other arguments.
Then "arguments" are left for more regular file parameters, the primary purpose of the command (e.g. "sign, encrypt, decrypt this file", with "verify" being of course the tricky bit).
So instead of:
sop sign --as=text alice.sec < announcement.txt > announcement.txt.asc
We do:
sop sign --as=text --sign-with=alice.sec < announcement.txt >announcement.txt.asc
The idea is to use the --PURPOSE-with
pattern (where PURPOSE is
sign
, verify
, etc) that is already used in encrypt --sign-with
.
An alternative implementation of this would be to also accept --with
as a shorthand of the --PURPOSE-with
argument if PURPOSE
is
unambiguous (like encrypt
or sign
).
Closes: #7 (closed)