google / google/python-fire

feature request: allow passing unparsed parameters

Đang mở
#118 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
28.2k
Fork
1.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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 - --

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.