Don't parse options after the last positional argument

后端 未结 3 460
野的像风
野的像风 2020-12-17 10:55

I\'m writing a wrapper around the ssh command line client. After the first positional argument that\'s part of command, all further options should

3条回答
  •  有刺的猬
    2020-12-17 11:27

    Another option is to use parse_known_args, which stops parsing when an unknown argument is encountered.

提交回复
热议问题