Full command line as it was typed

后端 未结 8 2049
猫巷女王i
猫巷女王i 2020-12-01 20:56

I want to get the full command line as it was typed.

This:

\" \".join(sys.argv[:])

doesn\'t work here (deletes double quotes). Also I pr

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-01 21:05

    You're too late. By the time that the typed command gets to Python your shell has already worked its magic. For example, quotes get consumed (as you've noticed), variables get interpolated, etc.

提交回复
热议问题