google / google/python-fire

feature request: allow passing unparsed parameters

未关闭
#118 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
28.2k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

a common idiom in cli is to have a flag (usually --, but this is taken here) that all text afterwards is passed as is (mostly for passing to other commands)

it could be useful to have a similar feature in fire

for example:

> example.py foo --- this is passed as is - --

example.py:
```
import fire

def hello(name, __unparsed__):
print(name)
print(__unparsed__)

if __name__ == '__main__':
fire.Fire(hello)

```
will yield:
> foo
> this is passed as is - --

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。