【发布时间】:2020-11-22 22:49:41
【问题描述】:
我已将以下命令配置为 tox 中的命令。
bash -c "ps | awk '{print $1}'"
因为使用 {} 进行替换,我收到一个 tox 配置错误,提示 print $1 不存在。有没有好的解决方法?
【问题讨论】:
我已将以下命令配置为 tox 中的命令。
bash -c "ps | awk '{print $1}'"
因为使用 {} 进行替换,我收到一个 tox 配置错误,提示 print $1 不存在。有没有好的解决方法?
【问题讨论】:
来自the documentation on substitutions
如果需要,可以使用 \ 字符对花括号进行转义,例如:
commands = echo "\{posargs\}" = {posargs}
免责声明:我是 tox 维护者之一
【讨论】: