doctr icon indicating copy to clipboard operation
doctr copied to clipboard

Allow for multiple --command flags

Open goerz opened this issue 6 years ago • 1 comments

It seems like if I give the --command flag multiple times, only the last command will be executed. I would expect each --command to be run, in the order it was specified.

I can work around this with --command="cmd1 && cmd2 && cmd3", but it would be nicer to have this as --command=cmd1 --command=cmd2 --command=cmd3 (or else, show an error if --command is given multiple times).

goerz avatar Oct 18 '19 23:10 goerz

I think the current behavior is just the default argparse behavior where passing a flag multiple times just overrides the previous times. Allowing it to be passed multiple times sounds good to me.

asmeurer avatar Oct 21 '19 18:10 asmeurer