google / google/python-fire

feature request: allow passing unparsed parameters

Open
#118 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
28.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.